| # 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. | |
| import("//build/components.gni") | |
| import("//build/host.gni") | |
| import("//build/rust/rustc_binary.gni") | |
| import("//src/developer/ffx/lib/e2e_emu/ffx_e2e_test.gni") | |
| if (is_host) { | |
| group("host_tests") { | |
| testonly = true | |
| deps = [ ":verify_ffx_component_create_parent_overrides" ] | |
| } | |
| ffx_e2e_test("verify_ffx_component_create_parent_overrides") { | |
| testonly = true | |
| edition = "2024" | |
| source_root = "src/parent_overrides.rs" | |
| sources = [ source_root ] | |
| deps = [ | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates:log", | |
| ] | |
| product_bundle = ":product_bundle" | |
| } | |
| } | |
| ffx_e2e_product_bundle("product_bundle") { | |
| name = "verify_ffx_component_create_parent_overrides" | |
| product_configuration = { | |
| platform = { | |
| build_type = "eng" | |
| } | |
| base_packages = [ | |
| { | |
| package_target = ":ffx_create_parent_overrides_echo" | |
| }, | |
| ] | |
| } | |
| } | |
| if (is_fuchsia) { | |
| fuchsia_component_manifest("echo_manifest") { | |
| testonly = true | |
| component_name = "echo_config" | |
| manifest = "meta/echo_config.cml" | |
| } | |
| fuchsia_structured_config_rust_lib("echo_config_lib") { | |
| testonly = true | |
| cm_label = ":echo_manifest" | |
| } | |
| rustc_binary("echo_config_bin_for_component_create") { | |
| testonly = true | |
| edition = "2024" | |
| source_root = "src/echo_config.rs" | |
| sources = [ source_root ] | |
| deps = [ | |
| ":echo_config_lib", | |
| "//src/lib/fuchsia", | |
| "//third_party/rust_crates:log", | |
| ] | |
| } | |
| fuchsia_component("echo_config") { | |
| testonly = true | |
| cm_label = ":echo_manifest" | |
| deps = [ ":echo_config_bin_for_component_create" ] | |
| } | |
| fuchsia_structured_config_values("values_from_gn") { | |
| testonly = true | |
| cm_label = ":echo_manifest" | |
| values = { | |
| greeting = "not expected in test" | |
| } | |
| } | |
| fuchsia_package("ffx_create_parent_overrides_echo") { | |
| testonly = true | |
| deps = [ | |
| ":echo_config", | |
| ":values_from_gn", | |
| ] | |
| } | |
| } |