blob: 9f4e57345054a3a330b776fcb96c43960fa9e478 [file] [log] [blame]
# 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
if (has_board) {
deps = [ ":verify_ffx_component_create_parent_overrides" ]
}
}
if (has_board) {
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",
# This dependency won't get the package into the system image, but it is necessary to
# ensure the binary is rebuilt when needed by `fx test` invocations.
":ffx_create_parent_overrides_echo($default_toolchain)",
]
}
}
}
if (is_fuchsia) {
group("package_deps_for_host_tests") {
testonly = true
deps = [ ":ffx_create_parent_overrides_echo" ]
}
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",
]
}
}