blob: 4e213820dbce7d9776b86eac43aa84a64433a9f3 [file] [log] [blame]
# Copyright 2023 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/host.gni")
import("//build/rust/rustc_binary.gni")
import("//build/rust/rustc_test.gni")
import("//build/sdk/sdk_host_tool.gni")
if (is_host) {
rustc_binary("test_pilot") {
name = "test_pilot"
with_unit_tests = true
edition = "2021"
deps = [
"//src/lib/fuchsia",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:structopt",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tokio",
]
test_deps = [
"//third_party/rust_crates:assert_matches",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:tempfile",
]
sources = [
"src/errors.rs",
"src/main.rs",
"src/opts.rs",
"src/run_tests.rs",
"src/test_config.rs",
]
}
sdk_host_tool("test_pilot_sdk") {
category = "private"
output_name = "test_pilot"
deps = [ ":test_pilot" ]
}
install_host_tools("install") {
deps = [ ":test_pilot" ]
outputs = [ "test_pilot" ]
}
host_test_data("test_deps") {
testonly = true
deps = [ ":install" ]
sources = [ "${root_out_dir}/test_pilot" ]
}
}
group("tests") {
testonly = true
deps = [ ":test_pilot_test($host_toolchain)" ]
}