blob: 570ff7efbcde74d94e68e4ed0146134e9eecfe33 [file] [log] [blame]
# 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_rust",
"//sdk/fidl/fuchsia.process:fuchsia.process_rust",
"//sdk/fidl/fuchsia.test:fuchsia.test_rust",
"//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/namespace",
"//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:regex",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tracing",
]
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
visibility = [
":*",
"//bundles/assembly/*",
"//sdk/ctf/*",
"//src/sys/test_manager:*",
]
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",
]
}