| # Copyright 2022 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/rust/rustc_test.gni") |
| |
| rustc_test("rust_bin") { |
| name = "config_integration_test_rust" |
| edition = "2021" |
| source_root = "rust/lib.rs" |
| |
| deps = [ |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component-test", |
| "//third_party/rust_crates:anyhow", |
| ] |
| |
| sources = [ "rust/lib.rs" ] |
| } |
| |
| executable("cpp_bin") { |
| testonly = true |
| output_name = "config_integration_test_cpp" |
| sources = [ "cpp/test.cc" ] |
| |
| public_deps = [ |
| "//examples/diagnostics/inspect/codelab/cpp/testing:inspect-cpp-codelab-testing", |
| "//sdk/fidl/fuchsia.diagnostics", |
| "//sdk/lib/inspect/contrib/cpp:archive_reader", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//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_integration_test") { |
| test_components = [ ":rust_test" ] |
| deps = [ |
| "//examples/components/config/rust:component", |
| "//examples/components/config/rust:values_from_gn", |
| ] |
| } |
| |
| fuchsia_test_package("cpp_config_integration_test") { |
| test_components = [ ":cpp_test" ] |
| deps = [ |
| "//examples/components/config/cpp:component", |
| "//examples/components/config/cpp:values_from_gn", |
| ] |
| } |
| |
| fuchsia_test_package("cpp_config_integration_test_with_json_values") { |
| test_components = [ ":cpp_test" ] |
| deps = [ |
| "//examples/components/config/cpp:component", |
| "//examples/components/config/cpp:values_from_json_file", |
| ] |
| } |
| |
| fuchsia_test_package("rust_config_integration_test_with_json_values") { |
| test_components = [ ":rust_test" ] |
| deps = [ |
| "//examples/components/config/rust:component", |
| "//examples/components/config/rust:values_from_json_file", |
| ] |
| } |
| |
| group("integration_test") { |
| testonly = true |
| deps = [ |
| ":cpp_config_integration_test", |
| ":cpp_config_integration_test_with_json_values", |
| ":rust_config_integration_test", |
| ":rust_config_integration_test_with_json_values", |
| ] |
| } |