blob: 025c0a88c354b1f42269957611bb4c99f7669a1f [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")
executable("bin") {
testonly = true
output_name = "structured_config_bad_values"
sources = [ "src/main.cc" ]
deps = [ "//sdk/lib/syslog/cpp" ]
}
fuchsia_component_manifest("manifest") {
testonly = true
component_name = "cpp_elf_receiver"
manifest = "meta/receiver.cml"
}
fuchsia_structured_config_cpp_elf_lib("config_lib") {
testonly = true
namespace = "receiver_config"
cm_label = ":manifest"
}
fuchsia_component("component") {
testonly = true
cm_label = ":manifest"
deps = [ ":bin" ]
}
fuchsia_component_manifest("bad_values") {
testonly = true
manifest = "meta/bad_values.cml"
}
fuchsia_structured_config_values("values") {
testonly = true
cm_label = ":bad_values"
values_source = "bad_values.json5"
cvf_output_name = "cpp_elf_receiver"
}
rustc_test("cpp_sc_bad_values_test_bin") {
edition = "2024"
source_root = "src/test.rs"
sources = [ "src/test.rs" ]
deps = [
"//sdk/fidl/fuchsia.component:fuchsia.component_rust",
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
]
}
fuchsia_test_component("test_component") {
manifest = "meta/test.cml"
deps = [ ":cpp_sc_bad_values_test_bin" ]
}
fuchsia_test_package("tests") {
package_name = "sc_cpp_bad_values_test"
test_components = [ ":test_component" ]
validate_structured_config = false
deps = [
":component",
":values",
# https://fxbug.dev/42052321: Dep included for affected tests presubmit
"//src/sys/component_manager:component-manager-realm-builder-cmp",
]
}