blob: 308086b9bcbe4d759718d30566fcdced5dc1e123 [file] [log] [blame]
# Copyright 2019 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_binary.gni")
group("manager") {
testonly = true
public_deps = [
":intl_property_manager",
":tests",
]
}
group("tests") {
testonly = true
public_deps = [ ":intl_property_manager_tests" ]
}
rustc_binary("intl_property_manager_bin") {
name = "intl_property_manager"
edition = "2021"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.intl:fuchsia.intl_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component",
"//src/testing/fidl/intl_property_manager/fidl:fuchsia.test.intl.manager_rust",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:structopt",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//src/lib/fuchsia-component-test",
"//third_party/rust_crates:lazy_static",
]
sources = [ "src/main.rs" ]
}
fuchsia_component("intl_property_manager_component") {
component_name = "intl_property_manager"
manifest = "meta/intl_property_manager.cml"
deps = [ ":intl_property_manager_bin" ]
}
fuchsia_component("intl_property_manager_without_flags_component") {
component_name = "intl_property_manager_without_flags"
manifest = "meta/intl_property_manager_without_flags.cml"
deps = [ ":intl_property_manager_bin" ]
}
fuchsia_package("intl_property_manager") {
deps = [
":intl_property_manager_component",
":intl_property_manager_without_flags_component",
]
}
fuchsia_component("intl_property_manager_tests_component") {
testonly = true
component_name = "intl_property_manager_tests"
manifest = "meta/intl_property_manager_test.cml"
deps = [ ":intl_property_manager_bin_test" ]
}
fuchsia_test_package("intl_property_manager_tests") {
test_components = [ ":intl_property_manager_tests_component" ]
deps = [
":intl_property_manager_component",
":intl_property_manager_without_flags_component",
]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
fuchsia_component_manifest("fake_intl_services_manifest") {
testonly = true
component_name = "intl"
manifest = "meta/intl_property_manager.cml"
}
fuchsia_component("fake_intl_services_component") {
testonly = true
cm_label = ":fake_intl_services_manifest"
deps = [ ":intl_property_manager_bin" ]
}
# Fake intl_services package, only use for testing.
# Standing up real intl_services needs more backends, which sometimes
# can be impractical.
fuchsia_package("fake_intl_services_package") {
testonly = true
package_name = "intl_services"
deps = [ ":fake_intl_services_component" ]
}