| # Copyright 2023 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. |
| |
| assert(is_fuchsia, "These targets are only compiled in the fuchsia toolchain.") |
| |
| import("//build/components.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_test("rust_bin") { |
| name = "config_from_parent_integration_test_rust" |
| edition = "2021" |
| source_root = "rust/lib.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/diagnostics/testing/diagnostics-assertions/rust:diagnostics-assertions", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//third_party/rust_crates:anyhow", |
| ] |
| |
| sources = [ "rust/lib.rs" ] |
| } |
| |
| executable("cpp_bin") { |
| testonly = true |
| output_name = "config_from_parent_integration_test_cpp" |
| sources = [ "cpp/test.cc" ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_cpp", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_cpp", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_cpp_hlcpp_conversion", |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_cpp", |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_hlcpp", |
| "//sdk/lib/component/incoming/cpp", |
| "//sdk/lib/diagnostics/reader/cpp:archive_reader", |
| "//sdk/lib/sys/component/cpp/testing:cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| ] |
| } |
| |
| fuchsia_test_component("rust_test") { |
| component_name = "config_integration_test_rust" |
| manifest = "meta/config_integration_test_rust.cml" |
| deps = [ ":rust_bin" ] |
| } |
| |
| fuchsia_test_component("cpp_test") { |
| component_name = "config_integration_test_cpp" |
| manifest = "meta/config_integration_test_cpp.cml" |
| deps = [ ":cpp_bin" ] |
| } |
| |
| fuchsia_test_package("rust_config_from_parent_integration_test") { |
| test_components = [ ":rust_test" ] |
| deps = [ |
| "//examples/components/config_from_parent/rust:component", |
| "//examples/components/config_from_parent/rust:values_from_gn", |
| ] |
| } |
| |
| fuchsia_test_package("cpp_config_from_parent_integration_test") { |
| test_components = [ ":cpp_test" ] |
| deps = [ |
| "//examples/components/config_from_parent/cpp:component", |
| "//examples/components/config_from_parent/cpp:values_from_gn", |
| ] |
| } |
| |
| group("hermetic_tests") { |
| testonly = true |
| deps = [ |
| ":cpp_config_from_parent_integration_test", |
| ":rust_config_from_parent_integration_test", |
| ] |
| } |