| # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/bind/bind.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//build/test.gni") |
| import("//src/sys/build/components.gni") |
| |
| bind_rules("goldfish-display-bind") { |
| rules = "goldfish-display.bind" |
| output = "goldfish-display-bind.h" |
| tests = "bind-tests.json" |
| deps = [ "//src/devices/bind/fuchsia.goldfish" ] |
| } |
| |
| driver_module("goldfish-display") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "display.cc" ] |
| deps = [ |
| ":common", |
| ":goldfish-display-bind", |
| "//src/devices/lib/driver", |
| ] |
| } |
| |
| source_set("common") { |
| visibility = [ ":*" ] |
| configs += [ "//build/config:all_source" ] |
| sources = [] |
| public_deps = [ |
| "//sdk/banjo/fuchsia.hardware.display.controller", |
| "//sdk/banjo/fuchsia.hardware.goldfish.control", |
| "//sdk/banjo/fuchsia.hardware.goldfish.pipe", |
| "//sdk/banjo/fuchsia.hardware.sysmem", |
| "//sdk/fidl/fuchsia.hardware.goldfish:fuchsia.hardware.goldfish_llcpp", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_c", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async:async-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/trace:trace-driver", |
| ] |
| } |
| |
| test("goldfish-unittests") { |
| configs += [ |
| "//build/unification/config:zircon-migrated", |
| "//build/config:all_source", |
| ] |
| sources = [ |
| "display-test.cc", |
| "display.cc", |
| ] |
| deps = [ |
| ":common", |
| ":goldfish-display-bind", |
| "//sdk/banjo/fuchsia.hardware.platform.device:fuchsia.hardware.platform.device_banjo_cpp", |
| "//sdk/lib/fdio", |
| "//src/devices/bus/lib/device-protocol-pdev", |
| "//src/devices/bus/lib/device-protocol-platform-device", |
| "//src/devices/testing/no_ddk", |
| "//zircon/public/lib/zxtest", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":goldfish-display-bind_test", |
| ":goldfish-unittests-package", |
| ] |
| } |
| |
| fuchsia_unittest_package("goldfish-unittests-package") { |
| package_name = "goldfish-unittests" |
| deps = [ ":goldfish-unittests" ] |
| } |