| # 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/components.gni") |
| import("//build/drivers.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/test.gni") |
| |
| fidl("fuchsia.device.inspect.test") { |
| testonly = true |
| sources = [ "inspect.test.fidl" ] |
| visibility = [ ":*" ] |
| public_deps = [ "//zircon/vdso/zx" ] |
| } |
| |
| driver_bind_rules("inspect-test-bind") { |
| rules = "meta/inspect-test.bind" |
| deps = [ "//src/devices/bind/fuchsia.test.platform" ] |
| } |
| |
| fuchsia_driver("fuchsia_driver") { |
| output_name = "inspect-test" |
| testonly = true |
| |
| sources = [ "test-driver.cc" ] |
| deps = [ |
| ":fuchsia.device.inspect.test_cpp", |
| ":inspect-test-bind", |
| "//sdk/lib/fdio", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/inspect", |
| ] |
| visibility = [ |
| ":*", |
| "//src/devices/bundles:drivers", |
| ] |
| } |
| |
| fuchsia_driver_component("inspect-test-driver") { |
| testonly = true |
| component_name = "inspect-test" |
| deps = [ ":fuchsia_driver" ] |
| info = "meta/driver-info.json" |
| manifest = "meta/driver.cml" |
| } |
| |
| test("inspect-test") { |
| testonly = true |
| sources = [ "test.cc" ] |
| deps = [ |
| ":fuchsia.device.inspect.test_cpp", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_cpp", |
| "//sdk/lib/async:async-cpp", |
| "//sdk/lib/diagnostics/reader/cpp", |
| "//sdk/lib/fdio", |
| "//sdk/lib/inspect/testing/cpp", |
| "//src/devices/testing/driver-integration-test-shim", |
| "//src/lib/ddk", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/inspect", |
| "//zircon/system/ulib/zx", |
| ] |
| visibility = [ ":*" ] |
| } |
| |
| fuchsia_unittest_component("inspect-test-component") { |
| manifest = "meta/test.cml" |
| deps = [ ":inspect-test" ] |
| } |
| |
| fuchsia_test_package("driver-inspect-test") { |
| test_components = [ ":inspect-test-component" ] |
| deps = [ |
| ":inspect-test-driver", |
| "//src/devices/board/drivers/integration-test", |
| "//src/devices/bus/drivers/platform", |
| ] |
| } |