| # 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/components.gni") |
| import("//build/fidl/fidl.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| rustc_library("lib") { |
| testonly = true |
| name = "cm_stress_tests_lib" |
| edition = "2021" |
| source_root = "lib.rs" |
| |
| # Only for internal use. |
| visibility = [ ":*" ] |
| |
| deps = [ |
| ":test.componentmanager.stresstests_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-component-test", |
| "//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 = "2021" |
| source_root = "realm_with_many_children.rs" |
| deps = [ |
| ":lib", |
| ":test.componentmanager.stresstests_rust", |
| "//src/lib/fuchsia-async", |
| "//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 = "2021" |
| source_root = "deep_tree_stress_test.rs" |
| deps = [ |
| ":lib", |
| "//src/lib/fuchsia-async", |
| ] |
| |
| sources = [ "deep_tree_stress_test.rs" ] |
| } |
| |
| rustc_binary("child_for_stress_test_bin") { |
| testonly = true |
| name = "child_for_stress_test" |
| edition = "2021" |
| source_root = "child_for_stress_test.rs" |
| deps = [ |
| ":lib", |
| ":test.componentmanager.stresstests_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| 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", |
| |
| # fxbug.dev/101490: Dep included for affected tests presubmit |
| "//src/sys/component_manager:component-manager-realm-builder-cmp", |
| ] |
| test_specs = { |
| parallel = 1 |
| } |
| test_components = [ |
| ":realm_with_many_children", |
| ":deep_tree_stress_test", |
| ] |
| } |
| |
| group("stress_tests") { |
| testonly = true |
| deps = [ ":component-manager-stress-tests" ] |
| } |