blob: 7efcf192c61dd5e4cd153e3053f679cab8bd4667 [file]
# 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_test.gni")
import("//build/test/test_package.gni")
rustc_test("destruction_integration_test_bin") {
name = "destruction_integration_test"
edition = "2018"
source_root = "integration_test.rs"
deps = [
"//garnet/lib/rust/io_util",
"//src/lib/fuchsia-async",
"//src/sys/component_manager/testing:test_utils_lib",
"//third_party/rust_crates:anyhow",
]
sources = [ "integration_test.rs" ]
}
rustc_binary("destruction_collection_realm_bin") {
name = "destruction_collection_realm"
edition = "2018"
source_root = "collection_realm.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/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//src/sys/component_manager/tests/fidl:components-rustc",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:log",
]
sources = [ "collection_realm.rs" ]
}
rustc_binary("destruction_trigger_bin") {
name = "destruction_trigger"
edition = "2018"
source_root = "trigger.rs"
deps = [
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/sys/component_manager/tests/fidl:components-rustc",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
]
sources = [ "trigger.rs" ]
}
test_package("destruction_integration_test") {
deps = [
":destruction_collection_realm_bin",
":destruction_integration_test_bin",
":destruction_trigger_bin",
]
meta = [
{
path = rebase_path("meta/trigger.cml")
dest = "trigger.cm"
},
{
path = rebase_path("meta/trigger_realm.cml")
dest = "trigger_realm.cm"
},
{
path = rebase_path("meta/collection_realm.cml")
dest = "collection_realm.cm"
},
]
binaries = [
{
name = "trigger"
source = "${root_out_dir}/destruction_trigger"
},
{
name = "collection_realm"
source = "${root_out_dir}/destruction_collection_realm"
},
]
tests = [
{
name = "destruction_integration_test"
},
]
}