| # Copyright 2020 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/fidl/fidl.gni") |
| import("//build/test.gni") |
| import("//zircon/system/ulib/devmgr-integration-test/isolated_devmgr.gni") |
| |
| fidl("fuchsia.device.instancelifecycle.test") { |
| testonly = true |
| sources = [ "instancelifecycle.test.fidl" ] |
| visibility = [ ":*" ] |
| public_deps = [ "//zircon/vdso/zx" ] |
| } |
| |
| bind_rules("test-lifecycle-bind") { |
| rules = "test-lifecycle.bind" |
| output = "test-lifecycle-bind.h" |
| deps = [ "//src/devices/bind/test.platform" ] |
| } |
| |
| driver_module("driver") { |
| output_name = "ddk-instance-lifecycle-test" |
| |
| testonly = true |
| sources = [ |
| "test-driver-child.cc", |
| "test-driver.cc", |
| ] |
| deps = [ |
| ":fuchsia.device.instancelifecycle.test_llcpp", |
| ":test-lifecycle-bind", |
| "//sdk/lib/fdio", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/sync", |
| ] |
| visibility = [ |
| ":*", |
| "//src/devices/bundles:drivers", |
| ] |
| } |
| |
| test("tests") { |
| output_name = "ddk-instance-lifecycle-test" |
| |
| testonly = true |
| sources = [ "test.cc" ] |
| deps = [ |
| ":fuchsia.device.instancelifecycle.test_llcpp", |
| "//sdk/lib/fdio", |
| "//src/lib/ddk", |
| "//zircon/public/lib/fbl", |
| "//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", |
| ] |
| visibility = [ ":*" ] |
| } |
| |
| isolated_devmgr_unittest_package("ddk-instance-lifecycle-test") { |
| executable_path = "test/ddk-instance-lifecycle-test" |
| |
| deps = [ |
| ":driver", |
| ":tests", |
| "//src/devices/board/drivers/integration-test", |
| "//src/devices/bus/drivers/platform", |
| "//src/devices/misc/drivers/test", |
| "//src/devices/tests/sysdev", |
| ] |
| } |