| # 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/config/fuchsia/rules.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/test.gni") |
| import("//build/unification/images/migrated_manifest.gni") |
| |
| fidl("fuchsia.device.power.test") { |
| sources = [ "test.fidl" ] |
| public_deps = [ "//zircon/system/fidl/fuchsia-device" ] |
| } |
| |
| driver_module("ddk-power-test") { |
| defines = [ "_ALL_SOURCE" ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "test-driver.cc" ] |
| deps = [ |
| ":fuchsia.device.power.test_llcpp", |
| "//src/devices/lib/driver", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/ddktl", |
| "//zircon/public/lib/fdio", |
| ] |
| } |
| |
| driver_module("ddk-power-test-child") { |
| defines = [ "_ALL_SOURCE" ] |
| configs += [ "//build/config/fuchsia:enable_zircon_asserts" ] |
| configs -= [ "//build/config/fuchsia:no_cpp_standard_library" ] |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "test-driver-child.cc" ] |
| deps = [ |
| ":fuchsia.device.power.test_llcpp", |
| "//src/devices/lib/driver", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/ddktl", |
| "//zircon/public/lib/fdio", |
| ] |
| } |
| |
| test("ddk-power") { |
| # Dependent manifests unfortunately cannot be marked as `testonly`. |
| # TODO(44278): Remove when converting this file to proper GN build idioms. |
| testonly = false |
| configs += [ "//build/unification/config:zircon-migrated" ] |
| sources = [ "test.cc" ] |
| deps = [ |
| ":fuchsia.device.power.test_llcpp", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/fidl/fuchsia-device:llcpp", |
| "//zircon/system/fidl/fuchsia-device-manager:c", |
| "//zircon/system/ulib/devmgr-integration-test", |
| "//zircon/system/ulib/devmgr-launcher", |
| "//zircon/system/ulib/driver-integration-test", |
| ] |
| } |
| |
| migrated_manifest("ddk-power-test-manifest") { |
| deps = [ ":ddk-power-test" ] |
| } |
| |
| migrated_manifest("ddk-power-test-child-manifest") { |
| deps = [ ":ddk-power-test-child" ] |
| } |
| |
| migrated_manifest("ddk-power-manifest") { |
| deps = [ ":ddk-power" ] |
| } |