| # Copyright 2021 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") |
| |
| rustc_binary("bin") { |
| testonly = true |
| name = "starnix_test_runner" |
| with_unit_tests = true |
| edition = "2021" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component-rustc", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl-rustc", |
| "//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner-rustc", |
| "//sdk/fidl/fuchsia.data:fuchsia.data-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.process:fuchsia.process-rustc", |
| "//sdk/fidl/fuchsia.test:fuchsia.test-rustc", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/runner", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:rand", |
| "//third_party/rust_crates:tracing", |
| "//third_party/rust_crates:url", |
| ] |
| |
| sources = [ |
| "src/main.rs", |
| "src/runner.rs", |
| "src/test_suite.rs", |
| ] |
| } |
| |
| fuchsia_component("test_runners") { |
| testonly = true |
| manifest = "meta/starnix_test_runners.cml" |
| component_name = "starnix_test_runners" |
| } |
| |
| fuchsia_component("starnix_test_runner") { |
| testonly = true |
| manifest = "meta/starnix_test_runner.cml" |
| component_name = "starnix_test_runner" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_component("starnix_unit_test_runner") { |
| testonly = true |
| manifest = "meta/starnix_unit_test_runner.cml" |
| component_name = "starnix_unit_test_runner" |
| deps = [ "//src/sys/test_runners/rust:bin" ] |
| } |
| |
| fuchsia_package("starnix-test-runners") { |
| testonly = true |
| deps = [ |
| ":starnix_test_runner", |
| ":starnix_unit_test_runner", |
| ":test_runners", |
| ] |
| } |
| |
| fuchsia_unittest_package("starnix-test-runner-tests") { |
| deps = [ ":bin_test" ] |
| |
| manifest = "meta/starnix_test_runner_tests.cml" |
| |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("starnix") { |
| testonly = true |
| if (target_cpu == "x64") { |
| deps = [ ":starnix-test-runners" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| if (target_cpu == "x64") { |
| deps = [ ":starnix-test-runner-tests" ] |
| } |
| } |