| # Copyright 2020 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 = "go_test_runner" |
| with_unit_tests = true |
| edition = "2021" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component.runner:fuchsia.component.runner-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.process:fuchsia.process-rustc", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2-rustc", |
| "//sdk/fidl/fuchsia.test:fuchsia.test-rustc", |
| "//sdk/fidl/fuchsia.test:rust_measure_tape_for_case", |
| "//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", |
| "//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:rand", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates:tracing", |
| "//third_party/rust_crates:uuid", |
| ] |
| |
| test_deps = [ |
| "//src/sys/test_runners:test_lib", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:itertools", |
| "//third_party/rust_crates:pretty_assertions", |
| ] |
| |
| sources = [ |
| "src/main.rs", |
| "src/test_server.rs", |
| ] |
| } |
| |
| fuchsia_component("go_test_runner") { |
| testonly = true |
| manifest = "meta/go-test-runner.cml" |
| component_name = "go-test-runner" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("go-test-runner") { |
| testonly = true |
| deps = [ ":go_test_runner" ] |
| } |
| |
| group("gotests") { |
| testonly = true |
| deps = [ ":go-test-runner" ] |
| } |
| |
| fuchsia_unittest_component("test-component") { |
| deps = [ |
| ":bin_test", |
| "//src/sys/test_runners:test-with-process-launcher", |
| ] |
| } |
| |
| fuchsia_test_package("go-test-runner-test") { |
| test_components = [ ":test-component" ] |
| deps = [ |
| "test_data/empty_go_test:empty-go-test", |
| "test_data/sample_go_test:sample-go-test", |
| "//src/sys/test_runners/lib_loader_cache:lib_loader_runner_cache_cmp", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":go-test-runner-test", |
| "test_data", |
| "tests", |
| ] |
| } |