| # 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_library.gni") |
| import("//src/sys/core/build/core_shard.gni") |
| |
| rustc_library("test_lib") { |
| testonly = true |
| name = "test_manager_test_lib" |
| with_unit_tests = true |
| edition = "2021" |
| source_root = "src/test_lib.rs" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/test_diagnostics/rust:test_diagnostics", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:linked-hash-map", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ "src/test_lib.rs" ] |
| } |
| |
| rustc_library("lib") { |
| testonly = true |
| name = "test_manager_lib" |
| with_unit_tests = true |
| edition = "2021" |
| |
| # Only for internal use. |
| visibility = [ |
| ":*", |
| "tests/*", |
| ] |
| |
| deps = [ |
| "fidl/fuchsia.test.debug:fuchsia.test.debug_rust", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//sdk/fidl/fuchsia.component.resolution:fuchsia.component.resolution_rust", |
| "//sdk/fidl/fuchsia.component.test:fuchsia.component.test_rust", |
| "//sdk/fidl/fuchsia.data:fuchsia.data_rust", |
| "//sdk/fidl/fuchsia.debugdata:fuchsia.debugdata_rust", |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust", |
| "//sdk/fidl/fuchsia.diagnostics:fuchsia.diagnostics_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_rust", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//sdk/fidl/fuchsia.test:fuchsia.test_rust", |
| "//sdk/fidl/fuchsia.test.internal:fuchsia.test.internal_rust", |
| "//sdk/fidl/fuchsia.test.manager:fuchsia.test.manager_rust", |
| "//src/developer/remote-control/diagnostics-bridge", |
| "//src/lib/diagnostics/data/rust", |
| "//src/lib/diagnostics/inspect/contrib/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/diagnostics/log/rust", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/fuchsia-url", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/cm_moniker", |
| "//src/sys/lib/cm_rust", |
| "//src/sys/lib/cm_types", |
| "//src/sys/lib/mem_util", |
| "//src/sys/lib/moniker", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:glob", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:maplit", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| test_deps = [ |
| "//src/lib/fuchsia", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:maplit", |
| ] |
| |
| sources = [ |
| "src/above_root_capabilities.rs", |
| "src/constants.rs", |
| "src/debug_data_processor.rs", |
| "src/debug_data_server.rs", |
| "src/diagnostics.rs", |
| "src/enclosing_env.rs", |
| "src/error.rs", |
| "src/facet.rs", |
| "src/lib.rs", |
| "src/resolver.rs", |
| "src/run_events.rs", |
| "src/running_suite.rs", |
| "src/scheduler.rs", |
| "src/self_diagnostics.rs", |
| "src/test_manager_server.rs", |
| "src/test_suite.rs", |
| "src/utilities.rs", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| testonly = true |
| name = "test_manager" |
| with_unit_tests = true |
| edition = "2021" |
| |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.component.resolution:fuchsia.component.resolution_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.test.internal:fuchsia.test.internal_rust", |
| "//src/lib/diagnostics/inspect/runtime/rust", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("test_manager_cmp") { |
| testonly = true |
| component_name = "test_manager" |
| deps = [ ":bin" ] |
| manifest = "meta/test_manager.cml" |
| } |
| |
| fuchsia_component("test_manager_for_test_cmp") { |
| testonly = true |
| component_name = "test_manager_for_tests" |
| deps = [ ":bin" ] |
| manifest = "meta/test_manager_for_tests.cml" |
| } |
| |
| fuchsia_package("test_manager_pkg") { |
| testonly = true |
| package_name = "test_manager" |
| deps = [ |
| ":test_manager_cmp", |
| "debug_data:debug_data_rust", |
| "debug_data_processor", |
| "//src/diagnostics/archivist:archivist-for-embedding-v2", |
| "//src/storage/memfs:memfs_component", |
| "//src/sys/early_boot_instrumentation:early-boot-instrumentation", |
| ] |
| } |
| |
| core_shard("test_manager_core_shard") { |
| shard_file = "meta/test_manager.core_shard.cml" |
| } |
| |
| # TODO(fxbug.dev/102390): delete the below when there are no cmx tests. |
| core_shard("test_manager_cmx_support_core_shard") { |
| shard_file = "meta/test_manager_cmx_support.core_shard.cml" |
| } |
| |
| fuchsia_unittest_package("test-manager-unittests") { |
| manifest = "meta/test_manager_lib_test.cml" |
| deps = [ ":lib_test" ] |
| } |
| |
| # Defines test manager and its dependencies. |
| group("test_manager") { |
| testonly = true |
| deps = [ |
| ":test_manager_pkg", |
| "//src/lib/fuchsia-component-test/realm_builder_server:fuchsia-component-test", |
| "//src/sys/full-resolver", |
| "//src/sys/test_runners", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":test-manager-unittests", |
| "debug_data:tests", |
| "debug_data_processor:tests", |
| "tests", |
| ] |
| } |
| |
| group("legacy_tests") { |
| testonly = true |
| deps = [ "tests:legacy_tests" ] |
| } |