blob: 2f8c2881ba1c071962a4e88e930b50a2320714ca [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/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_test.gni")
import("//build/test/test_package.gni")
group("tests") {
testonly = true
deps = [
":elf_runner_test",
":no_pkg_resolver_test",
":shutdown_integration_test",
"collections:collections_integration_test",
"destruction:destruction_integration_test",
"hub:hub_integration_test",
"routing:tests",
"storage:storage_integration_test",
]
}
rustc_library("test_utils") {
name = "test_utils"
edition = "2018"
source_root = "test_utils.rs"
deps = [
"//garnet/public/rust/fdio",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-runtime",
"//garnet/public/rust/fuchsia-zircon",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//third_party/rust_crates:failure",
"//third_party/rust_crates:parking_lot",
]
}
rustc_test("shutdown_integration_test_bin") {
name = "shutdown_integration_test"
edition = "2018"
source_root = "shutdown_integration.rs"
deps = [
":test_utils",
"//garnet/public/rust/fuchsia-async",
"//third_party/rust_crates:failure",
]
}
rustc_binary("system_controller_client") {
name = "system_controller_client"
edition = "2018"
source_root = "system_controller_client.rs"
deps = [
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-syslog",
"//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc",
"//third_party/rust_crates:failure",
]
}
test_package("shutdown_integration_test") {
deps = [
":shutdown_integration_test_bin",
":system_controller_client",
":test_utils",
]
components =
[ "//src/sys/component_manager:component_manager_as_v1_component" ]
meta = [
{
path = rebase_path("meta/shutdown_integration_root.cml")
dest = "shutdown_integration_root.cm"
},
{
path = rebase_path("meta/system_controller_consumer.cml")
dest = "system_controller_consumer.cm"
},
]
binaries = [
{
name = "system_controller_client"
},
]
tests = [
{
name = "shutdown_integration_test"
},
]
}
rustc_test("elf_runner_test_bin") {
name = "elf_runner_test"
edition = "2018"
source_root = "elf_runner_test.rs"
deps = [
"//garnet/lib/rust/cm_fidl_translator",
"//garnet/public/rust/fdio",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-component",
"//garnet/public/rust/fuchsia-runtime",
"//garnet/public/rust/fuchsia-zircon",
"//sdk/fidl/fuchsia.data:fuchsia.data-rustc",
"//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc",
"//third_party/rust_crates:failure",
]
}
test_package("elf_runner_test") {
deps = [
":elf_runner_test_bin",
"//examples/components/basic:echo_args_bin",
]
components =
[ "//src/sys/component_manager:component_manager_as_v1_component" ]
meta = [
{
path = rebase_path("meta/echo_no_args.cml")
dest = "echo_no_args.cm"
},
{
path = rebase_path("//examples/components/basic/meta/echo_args.cml")
dest = "echo_args.cm"
},
]
binaries = [
{
name = "echo_args"
},
]
tests = [
{
name = "elf_runner_test"
},
]
}
rustc_test("no_pkg_resolver_test_bin") {
name = "no_pkg_resolver_test"
edition = "2018"
source_root = "no_pkg_resolver_test.rs"
deps = [
"//garnet/public/rust/fuchsia-async",
"//src/sys/component_manager:lib",
]
}
test_package("no_pkg_resolver_test") {
deps = [
":no_pkg_resolver_test_bin",
]
tests = [
{
name = "no_pkg_resolver_test"
},
]
}