blob: 62d45a87a11f80d52180a4f397bc2b26b96423d5 [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")
import("//build/rust/rustc_test.gni")
rustc_test("cs_integration_test_bin") {
name = "cs_integration_test"
edition = "2018"
source_root = "cs_integration_test.rs"
deps = [
"//src/lib/fuchsia-async",
"//src/sys/component_manager/testing:test_utils_lib",
"//src/sys/lib/component-events",
"//src/sys/tools/cs:lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:regex",
]
sources = [ "cs_integration_test.rs" ]
}
fuchsia_component("echo_server") {
testonly = true
manifest = "//examples/components/routing/echo_server/meta/echo_server.cml"
deps = [ "//examples/components/routing/echo_server" ]
}
fuchsia_component("indef_echo_client") {
testonly = true
manifest = "indef_echo_client/meta/indef_echo_client.cml"
deps = [ "indef_echo_client:indef_echo_client" ]
}
fuchsia_component("cs_integration_test") {
testonly = true
manifest = "meta/cs_integration_test.cmx"
deps = [ ":cs_integration_test_bin" ]
}
meta_components = []
foreach(meta_file,
[
"empty",
"echo_realm",
]) {
fuchsia_component(meta_file) {
testonly = true
manifest = "meta/${meta_file}.cml"
}
meta_components += [ ":${meta_file}" ]
}
meta_tree_components = []
foreach(meta_file,
[
"bar",
"baz",
"foo",
"root",
]) {
fuchsia_component(meta_file) {
testonly = true
manifest = "meta/tree/${meta_file}.cml"
}
meta_tree_components += [ ":${meta_file}" ]
}
fuchsia_test_package("cs-tests") {
deps = [
":echo_server",
":indef_echo_client",
]
foreach(component, meta_components) {
deps += [ component ]
}
foreach(component, meta_tree_components) {
deps += [ component ]
}
test_components = [ ":cs_integration_test" ]
}