| # Copyright 2022 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/rust/rustc_library.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":guest_cli_tests" ] |
| } |
| |
| rustc_library("guest_cli") { |
| edition = "2021" |
| with_unit_tests = true |
| deps = [ |
| "//sdk/fidl/fuchsia.virtualization:fuchsia.virtualization_rust", |
| "//sdk/rust/zx-status", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/virtualization/lib/cli/args:guest_cli_args", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:blocking", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:prettytable-rs", |
| "//third_party/rust_crates:serde", |
| ] |
| |
| if (is_fuchsia) { |
| deps += [ "//src/lib/fuchsia-component" ] |
| } |
| if (is_host) { |
| deps += [ |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| ] |
| } |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.net:fuchsia.net_rust", |
| "//src/lib/async-utils", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ |
| "src/attach.rs", |
| "src/balloon.rs", |
| "src/launch.rs", |
| "src/lib.rs", |
| "src/list.rs", |
| "src/mem.rs", |
| "src/platform/fuchsia.rs", |
| "src/platform/host.rs", |
| "src/platform/mod.rs", |
| "src/socat.rs", |
| "src/stop.rs", |
| "src/vsockperf.rs", |
| "src/wipe.rs", |
| ] |
| } |
| |
| fuchsia_unittest_package("guest_cli_tests") { |
| deps = [ ":guest_cli_test" ] |
| } |