blob: f1994ea624496d3985a82158f55e5db87f0e239c [file] [log] [blame]
# Copyright 2020 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/fidl/fidl.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_library.gni")
import("//build/rust/rustc_test.gni")
import("//src/sys/build/components.gni")
rustc_library("lib") {
testonly = true
name = "cm_stress_tests_lib"
edition = "2018"
source_root = "lib.rs"
# Only for internal use.
visibility = [ ":*" ]
deps = [
":test.componentmanager.stresstests-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
]
sources = [ "lib.rs" ]
}
fidl("test.componentmanager.stresstests") {
testonly = true
sources = [ "stress.test.fidl" ]
}
rustc_test("realm_with_many_children_bin") {
testonly = true
name = "realm_with_many_children"
edition = "2018"
source_root = "realm_with_many_children.rs"
deps = [
":lib",
":test.componentmanager.stresstests-rustc",
"//src/lib/fuchsia-async",
"//src/lib/syslog/rust:syslog",
"//third_party/rust_crates:futures",
]
sources = [ "realm_with_many_children.rs" ]
}
rustc_test("deep_tree_stress_test_bin") {
testonly = true
name = "deep_tree_stress_test"
edition = "2018"
source_root = "deep_tree_stress_test.rs"
deps = [
":lib",
"//src/lib/fuchsia-async",
"//src/lib/syslog/rust:syslog",
]
sources = [ "deep_tree_stress_test.rs" ]
}
rustc_binary("child_for_stress_test_bin") {
testonly = true
name = "child_for_stress_test"
edition = "2018"
source_root = "child_for_stress_test.rs"
deps = [
":lib",
":test.componentmanager.stresstests-rustc",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
]
sources = [ "child_for_stress_test.rs" ]
}
fuchsia_component("realm_with_many_children") {
testonly = true
manifest = "meta/realm-with-many-children.cml"
component_name = "realm-with-many-children"
deps = [ ":realm_with_many_children_bin" ]
}
fuchsia_component("deep_tree_stress_test") {
testonly = true
manifest = "meta/deep-tree-stress-test.cml"
component_name = "deep-tree-stress-test"
deps = [ ":deep_tree_stress_test_bin" ]
}
fuchsia_component("child_for_stress_test") {
testonly = true
manifest = "meta/child-for-stress-test.cml"
component_name = "child-for-stress-test"
deps = [ ":child_for_stress_test_bin" ]
}
fuchsia_test_package("component-manager-stress-tests") {
deps = [ ":child_for_stress_test" ]
test_specs = {
parallel = 1
}
test_components = [
":realm_with_many_children",
":deep_tree_stress_test",
]
}
group("stress_tests") {
testonly = true
deps = [ ":component-manager-stress-tests" ]
}