| # 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/sdk/sdk_host_tool.gni") |
| |
| if (is_host) { |
| rustc_binary("bin") { |
| name = "fvdl" |
| edition = "2018" |
| |
| with_unit_tests = true |
| test_environments = [ host_env ] |
| |
| deps = [ |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-hyper:fuchsia-hyper", |
| "//third_party/rust_crates:ansi_term-v0_11_0", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:home", |
| "//third_party/rust_crates:hyper", |
| "//third_party/rust_crates:serial_test", |
| "//third_party/rust_crates:tempfile", |
| "//third_party/rust_crates:zip", |
| ] |
| source_root = "src/main.rs" |
| sources = [ |
| "src/args.rs", |
| "src/cipd.rs", |
| "src/main.rs", |
| "src/portpicker.rs", |
| "src/types.rs", |
| "src/vdl_files.rs", |
| ] |
| } |
| |
| sdk_host_tool("fvdl_sdk") { |
| category = "partner" |
| output_name = "fvdl" |
| deps = [ ":bin" ] |
| } |
| |
| install_host_tools("host") { |
| deps = [ ":bin" ] |
| outputs = [ "fvdl" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bin_test($host_toolchain)" ] |
| } |