| # Copyright 2024 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/components.gni") | |
| import("//build/testing/cc_test_executable.gni") | |
| import("//build/testing/environments.gni") | |
| # This must not be testonly so that we can include it into non-testonly product | |
| # and board definitions. | |
| # | |
| # In this example we include this test as both a regular fuchsia test inside a | |
| # core based test realm, as well as through a bootfs packaged test to run under | |
| # a bootstrap test realm. | |
| cc_test_executable("test") { | |
| output_name = "power-system-integration-example-test" | |
| sources = [ "test.cc" ] | |
| deps = [ | |
| "//sdk/fidl/fuchsia.component.sandbox:fuchsia.component.sandbox_cpp", | |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development_cpp", | |
| "//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_cpp", | |
| "//sdk/lib/async:async-cpp", | |
| "//sdk/lib/async-loop:async-loop-cpp", | |
| "//sdk/lib/async_patterns/cpp", | |
| "//sdk/lib/component/incoming/cpp", | |
| "//src/lib/fxl/test:gtest_main_no_testonly", | |
| "//src/power/testing/system-integration/util", | |
| "//zircon/system/ulib/sync:sync-cpp", | |
| ] | |
| } | |
| fuchsia_test_component("component") { | |
| component_name = "power_system_integration_example_test" | |
| manifest = "meta/test.cml" | |
| deps = [ | |
| ":test", | |
| "test-driver:component", | |
| ] | |
| test_type = "driver_system" | |
| } | |
| fuchsia_test_package("pkg") { | |
| package_name = "power_system_integration_example_test_pkg" | |
| test_components = [ ":component" ] | |
| } | |
| fuchsia_test_component("bootstrap_component") { | |
| component_name = "bootstrap_power_system_integration_example_test" | |
| manifest = "meta/test.cml" | |
| deps = [ | |
| ":test", | |
| "test-driver:component", | |
| ] | |
| test_type = "bootstrap_driver_system" | |
| } | |
| fuchsia_bootfs_test_package("bootstrap_pkg") { | |
| package_name = "bootstrap_power_system_integration_example_test_pkg" | |
| test_components = [ ":bootstrap_component" ] | |
| } |