| # 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-rustc", |
| "//sdk/fidl/fuchsia.process:fuchsia.process-rustc", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-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-runtime", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//src/sys/lib/runner", |
| "//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", |
| ] |
| 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 |
| 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 |
| deps = [ ":elf-test-ambient-exec-runner-component" ] |
| } |
| |
| group("elf") { |
| testonly = true |
| deps = [ |
| ":elf-test-ambient-exec-runner", |
| ":elf-test-runner", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ "tests" ] |
| } |