| # 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("//zircon/system/ulib/devmgr-integration-test/isolated_devmgr.gni") |
| |
| bind_rules("ddk-fidl-bind") { |
| rules = "ddk-fidl.bind" |
| output = "ddk-fidl-bind.h" |
| deps = [ "//src/devices/bind/test.platform" ] |
| } |
| |
| driver_module("fidl-llcpp-driver") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "fidl-llcpp-driver.cc" ] |
| |
| deps = [ |
| ":ddk-fidl-bind", |
| "//src/devices/lib/driver", |
| "//src/devices/tests/fuchsia-hardware-test:fuchsia.hardware.test_llcpp", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/fidl-utils", |
| ] |
| } |
| |
| bind_rules("ddk-fidl-async-bind") { |
| rules = "ddk-fidl-async.bind" |
| output = "ddk-fidl-async-bind.h" |
| deps = [ "//src/devices/bind/test.platform" ] |
| } |
| |
| driver_module("fidl-async-llcpp-driver") { |
| configs += [ |
| "//build/config:all_source", |
| "//build/config/fuchsia:enable_zircon_asserts", |
| ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "fidl-async-llcpp-driver.cc" ] |
| |
| deps = [ |
| ":ddk-fidl-async-bind", |
| "//src/devices/lib/driver", |
| "//src/devices/tests/fuchsia-hardware-test:fuchsia.hardware.test_llcpp", |
| "//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", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/fidl-utils", |
| ] |
| } |
| |
| test("ddk-fidl-test") { |
| sources = [ "test.cc" ] |
| deps = [ |
| "//sdk/lib/fdio", |
| "//src/devices/tests/fuchsia-hardware-test:fuchsia.hardware.test_c", |
| "//src/devices/tests/fuchsia-hardware-test:fuchsia.hardware.test_llcpp", |
| "//src/lib/ddk", |
| |
| # TODO(fxb/38132): Migrate to the new bind rules and delete the below |
| "//src/lib/ddk:ddk-deprecated-binding-headers", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/devmgr-integration-test", |
| "//zircon/system/ulib/devmgr-launcher", |
| "//zircon/system/ulib/driver-integration-test", |
| ] |
| } |
| |
| isolated_devmgr_unittest_package("ddk-fidl-test-package") { |
| package_name = "ddk-fidl-test" |
| executable_path = "test/ddk-fidl-test" |
| deps = [ |
| ":ddk-fidl-test", |
| ":fidl-async-llcpp-driver", |
| ":fidl-llcpp-driver", |
| "//src/devices/board/drivers/integration-test", |
| "//src/devices/bus/drivers/platform", |
| "//src/devices/tests/sysdev", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":ddk-fidl-test-package" ] |
| } |