| # 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") |
| |
| rustc_library("lib") { |
| name = "test_runners_elf_lib" |
| with_unit_tests = true |
| edition = "2021" |
| deps = [ |
| "//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner_rust", |
| "//sdk/fidl/fuchsia.process:fuchsia.process_rust", |
| "//sdk/fidl/fuchsia.test:fuchsia.test_rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/test_runners:lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| ] |
| test_deps = [ "//src/lib/fuchsia" ] |
| sources = [ |
| "src/launcher.rs", |
| "src/lib.rs", |
| "src/runner.rs", |
| "src/test_server.rs", |
| ] |
| } |
| |
| rustc_binary("bin") { |
| edition = "2021" |
| testonly = true |
| name = "elf_test_runner" |
| deps = [ |
| "//src/lib/fuchsia", |
| "//src/sys/test_runners/elf:lib", |
| "//third_party/rust_crates:anyhow", |
| ] |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("elf-test-runner-component") { |
| testonly = true |
| component_name = "elf-test-runner" |
| manifest = "meta/elf_test_runner.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("elf-test-runner") { |
| testonly = true |
| visibility = [ |
| ":*", |
| "//bundles/assembly/*", |
| "//src/sys/test_manager:*", |
| ] |
| deps = [ ":elf-test-runner-component" ] |
| } |
| |
| # Identical to elf-test-runner-component, just with the ambient exec job policy. |
| fuchsia_component("elf-test-ambient-exec-runner-component") { |
| testonly = true |
| component_name = "elf-test-ambient-exec-runner" |
| manifest = "meta/elf_test_ambient_exec_runner.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("elf-test-ambient-exec-runner") { |
| testonly = true |
| visibility = [ |
| ":*", |
| "//bundles/assembly/*", |
| "//src/sys/test_manager:*", |
| ] |
| deps = [ ":elf-test-ambient-exec-runner-component" ] |
| } |
| |
| # Identical to elf-test-runner-component, just with the create raw processes job policy. |
| fuchsia_component("elf-test-create-raw-processes-runner-component") { |
| testonly = true |
| component_name = "elf-test-create-raw-processes-runner" |
| manifest = "meta/elf_test_create_raw_processes_runner.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("elf-test-create-raw-processes-runner") { |
| testonly = true |
| visibility = [ |
| ":*", |
| "//bundles/assembly/*", |
| "//sdk/ctf/*", |
| "//src/sys/test_manager:*", |
| ] |
| deps = [ ":elf-test-create-raw-processes-runner-component" ] |
| } |
| |
| # Identical to elf-test-runner-component, just with the create raw processes and |
| # ambient exec job policies. |
| fuchsia_component( |
| "elf-test-create-raw-processes-ambient-exec-runner-component") { |
| testonly = true |
| component_name = "elf-test-create-raw-processes-ambient-exec-runner" |
| manifest = "meta/elf_test_create_raw_processes_ambient_exec_runner.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("elf-test-create-raw-processes-ambient-exec-runner") { |
| testonly = true |
| visibility = [ |
| ":*", |
| "//bundles/assembly/*", |
| "//sdk/ctf/*", |
| "//src/sys/test_manager:*", |
| ] |
| deps = [ ":elf-test-create-raw-processes-ambient-exec-runner-component" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "tests" ] |
| } |