blob: d70305c8872b44acac0e484364dfb3161d521806 [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/component/config.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_test.gni")
import("//src/sys/build/components.gni")
rustc_test("base_resolver_disabled_test_bin") {
name = "base_resolver_disabled_test"
edition = "2018"
source_root = "base_resolver_disabled_test.rs"
deps = [
"//garnet/examples/fidl/services:echo-rustc",
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/sys/component_manager/testing:test_utils_lib",
"//third_party/rust_crates:anyhow",
]
sources = [ "base_resolver_disabled_test.rs" ]
}
rustc_test("base_resolver_appmgr_loader_test_bin") {
name = "base_resolver_appmgr_loader_test"
edition = "2018"
source_root = "base_resolver_appmgr_loader_test.rs"
deps = [
"//garnet/examples/fidl/services:echo-rustc",
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/sys/component_manager/testing:test_utils_lib",
"//third_party/rust_crates:anyhow",
]
sources = [ "base_resolver_appmgr_loader_test.rs" ]
}
rustc_binary("root_component_bin") {
name = "root_component"
edition = "2018"
source_root = "root_component.rs"
deps = [
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.io:fuchsia.io-rustc",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-runtime",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
sources = [ "root_component.rs" ]
}
component_config("component_manager_base_resolver_disabled_test_config") {
sources = [ "cm_config_disabled_resolver.json" ]
dest = "data/component_manager_config_resolver_disabled"
}
component_config("component_manager_base_appmgr_loader_test_config") {
sources = [ "cm_config_appmgr_loader.json" ]
dest = "data/component_manager_config_appmgr_loader"
}
fuchsia_component("root") {
testonly = true
deps = [ ":root_component_bin" ]
manifest = "meta/root.cml"
}
fuchsia_component("simple_root") {
testonly = true
manifest = "meta/simple_root.cml"
}
fuchsia_component("base_resolver_disabled_test") {
testonly = true
deps = [ ":base_resolver_disabled_test_bin" ]
manifest = "meta/base_resolver_disabled_test.cmx"
}
fuchsia_component("base_resolver_appmgr_loader_test") {
testonly = true
deps = [ ":base_resolver_appmgr_loader_test_bin" ]
manifest = "meta/base_resolver_appmgr_loader_test.cmx"
}
fuchsia_component("component_manager_disabled_resolver") {
testonly = true
deps = [ "//src/sys/component_manager:bin" ]
manifest = "meta/component_manager_disabled_resolver.cmx"
}
fuchsia_component("component_manager_appmgr_loader") {
testonly = true
deps = [ "//src/sys/component_manager:bin" ]
manifest = "meta/component_manager_appmgr_loader.cmx"
}
fuchsia_component("echo_server") {
testonly = true
deps = [ "//garnet/examples/fidl/echo_server_rust:echo_server_rust_bin" ]
manifest = "meta/echo_server.cml"
}
fuchsia_test_package("base_resolver_test") {
test_components = [
":base_resolver_disabled_test",
":base_resolver_appmgr_loader_test",
]
deps = [
":component_manager_appmgr_loader",
":component_manager_base_appmgr_loader_test_config",
":component_manager_base_resolver_disabled_test_config",
":component_manager_disabled_resolver",
":echo_server",
":root",
":simple_root",
]
}