| # 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/rust/rustc_binary.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| rustc_binary("bin") { |
| name = "zedmon" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//src/lib/usb_bulk/rust:lib", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:clap", |
| "//third_party/rust_crates:lazy_static", |
| ] |
| } |
| |
| 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" ] |
| } |
| } |
| |
| group("zedmon_client") { |
| public_deps = [ ":bin($host_toolchain)" ] |
| } |
| |
| group("tests") { |
| public_deps = [ |
| ":bin_test($host_toolchain)", |
| ":zedmon_client_manual_test($host_toolchain)", |
| ] |
| testonly = true |
| } |