blob: 614128665c122343c92c2c4fd33b5759482a66c0 [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/dart/test.gni")
import("//build/host.gni")
import("//build/rust/rustc_binary.gni")
import("//build/testing/host_test_data.gni")
if (is_host) {
rustc_binary("bin") {
name = "zedmon"
edition = "2021"
with_unit_tests = true
deps = [
"//src/lib/usb_bulk/rust:lib",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:clap",
"//third_party/rust_crates:csv",
"//third_party/rust_crates:num-derive",
"//third_party/rust_crates:num-traits",
"//third_party/rust_crates:regex",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//src/lib/test_util",
"//third_party/rust_crates:assert_matches",
]
sources = [
"src/main.rs",
"src/protocol.rs",
"src/zedmon.rs",
]
}
}
# TODO(fxbug.dev/109244): Enable once test has been ported to a supported (non-Dart) language
# dart_test("zedmon_client_manual_test") {
# sources = [ "zedmon_client_manual_test.dart" ]
# deps = [ "//third_party/dart-pkg/pub/test" ]
# non_dart_deps = [ ":runtime_deps($host_toolchain)" ]
# # This test should only be run manually for now.
# environments = []
# }
if (is_host) {
host_test_data("runtime_deps") {
sources = [ "$root_out_dir/zedmon" ]
outputs = [ "$target_gen_dir/runtime_deps/{{source_file_part}}" ]
deps = [ ":bin" ]
}
}
install_host_tools("zedmon_client") {
deps = [ ":bin" ]
outputs = [ "zedmon" ]
}
group("client") {
testonly = true
deps = [
":tests",
":zedmon_client",
]
}
group("tests") {
public_deps = [
":bin_test($host_toolchain)",
# TODO(fxbug.dev/109244): Enable once test has been ported to a supported (non-Dart) language
# ":zedmon_client_manual_test($host_toolchain)",
]
testonly = true
}