blob: de9b84cd4222c4f18a0b7319801122cdb714014b [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("//build/test/test_package.gni")
rustc_test("base_resolver_test_bin") {
name = "base_resolver_test"
edition = "2018"
source_root = "base_resolver_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_test.rs" ]
}
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_test_config") {
sources = [ "cm_config.json" ]
}
component_config("component_manager_base_resolver_disabled_test_config") {
sources = [ "cm_config_disabled_resolver.json" ]
}
component_config("component_manager_base_appmgr_loader_test_config") {
sources = [ "cm_config_appmgr_loader.json" ]
}
test_package("base_resolver_test") {
deps = [
":base_resolver_appmgr_loader_test_bin",
":base_resolver_disabled_test_bin",
":base_resolver_test_bin",
":component_manager_base_appmgr_loader_test_config",
":component_manager_base_resolver_disabled_test_config",
":component_manager_base_resolver_test_config",
":root_component_bin",
"//garnet/examples/fidl/echo_server_rust:echo_server_rust_bin",
"//src/sys/component_manager:bin",
]
resources = [
{
path = "${root_gen_dir}/src/sys/component_manager/tests/base_resolver_test/component_manager_base_resolver_test_config"
dest = "component_manager_config"
},
{
path = "${root_gen_dir}/src/sys/component_manager/tests/base_resolver_test/component_manager_base_resolver_disabled_test_config"
dest = "component_manager_config_resolver_disabled"
},
{
path = "${root_gen_dir}/src/sys/component_manager/tests/base_resolver_test/component_manager_base_appmgr_loader_test_config"
dest = "component_manager_config_appmgr_loader"
},
]
binaries = [
{
name = "root_component"
},
{
name = "echo_server_rust"
dest = "echo_server"
},
{
name = "component_manager"
},
]
meta = [
{
path = rebase_path("meta/component_manager_without_loader.cmx")
dest = "component_manager_without_loader.cmx"
},
{
path = rebase_path("meta/component_manager_disabled_resolver.cmx")
dest = "component_manager_disabled_resolver.cmx"
},
{
path = rebase_path("meta/component_manager_appmgr_loader.cmx")
dest = "component_manager_appmgr_loader.cmx"
},
{
path = rebase_path("meta/root.cml")
dest = "root.cm"
},
{
path = rebase_path("meta/echo_server.cml")
dest = "echo_server.cm"
},
{
path = rebase_path("meta/simple_root.cml")
dest = "simple_root.cm"
},
]
tests = [
{
name = "base_resolver_test"
},
{
name = "base_resolver_disabled_test"
},
{
name = "base_resolver_appmgr_loader_test"
},
]
}