| # 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/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", |
| ] |
| } |
| } |
| |
| 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)" ] |
| testonly = true |
| } |