| # Copyright 2026 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. | |
| load( | |
| "//build/bazel/rules/components:fx_component.bzl", | |
| "fx_component", | |
| "fx_component_manifest", | |
| ) | |
| load("//build/bazel/rules/rust:rustc_test.bzl", "rustc_test") | |
| package(default_applicable_licenses = ["//:license"]) | |
| rustc_test( | |
| name = "test_manager_test_bin", | |
| srcs = ["src/tests.rs"], | |
| compile_data = ["//src/sys/test_runners/gtest/test_data:sample_tests_golden_events.rsf"], | |
| crate_name = "test_manager_test", | |
| crate_root = "src/tests.rs", | |
| edition = "2024", | |
| deps = [ | |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust", | |
| "//src/lib/diagnostics/selectors", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-async", | |
| "//src/lib/fuchsia-component", | |
| "//src/sys/test_manager:test_lib", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:pretty_assertions", | |
| "//third_party/rust_crates/vendor:test-case", | |
| ], | |
| ) | |
| rustc_test( | |
| name = "test_manager_stress_test_bin", | |
| srcs = ["src/stress_tests.rs"], | |
| crate_name = "test_manager_stress_test", | |
| crate_root = "src/stress_tests.rs", | |
| edition = "2024", | |
| deps = [ | |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-component", | |
| "//src/sys/test_manager:test_lib", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:pretty_assertions", | |
| ], | |
| ) | |
| rustc_test( | |
| name = "test_manager_specified_realm_bin", | |
| srcs = ["src/specified_realm_test.rs"], | |
| crate_name = "test_manager_specified_realm_test", | |
| crate_root = "src/specified_realm_test.rs", | |
| edition = "2024", | |
| deps = [ | |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", | |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", | |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust", | |
| "//src/lib/diagnostics/selectors", | |
| "//src/lib/fidl/rust/fidl", | |
| "//src/lib/fuchsia", | |
| "//src/lib/fuchsia-component", | |
| "//src/sys/test_manager:test_lib", | |
| "//third_party/rust_crates/vendor:anyhow", | |
| "//third_party/rust_crates/vendor:futures", | |
| "//third_party/rust_crates/vendor:pretty_assertions", | |
| "//third_party/rust_crates/vendor:test-case", | |
| ], | |
| ) | |
| fx_component_manifest( | |
| name = "test_realm-manifest", | |
| testonly = True, | |
| component_name = "test_realm", | |
| includes = [ | |
| "//sdk/lib/inspect:offer.shard", | |
| "//sdk/lib/sys/component:realm_builder.shard", | |
| "//sdk/lib/syslog:client.shard", | |
| ], | |
| manifest = "meta/test_realm.cml", | |
| ) | |
| fx_component( | |
| name = "test_realm", | |
| testonly = True, | |
| compiled_manifest = ":test_realm-manifest", | |
| visibility = ["//src/sys/run_test_suite/tests:__pkg__"], | |
| ) |