| # 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("//src/developer/ffx/build/ffx_plugin.gni") |
| import("//src/developer/ffx/build/ffx_tool.gni") |
| |
| assert(is_host) |
| |
| ffx_plugin("ffx_net_test_realm") { |
| edition = "2021" |
| with_unit_tests = true |
| args_deps = [ |
| "//src/connectivity/network/testing/network-test-realm/fidl:fuchsia.net.test.realm_rust", |
| "//src/lib/network/fidl_fuchsia_net_ext", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.developer.remotecontrol:fuchsia.developer.remotecontrol_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.net:fuchsia.net_rust", |
| "//sdk/fidl/fuchsia.net.dhcpv6:fuchsia.net.dhcpv6_rust", |
| "//sdk/fidl/fuchsia.sys2:fuchsia.sys2_rust", |
| "//src/connectivity/lib/fidl_fuchsia_net_dhcpv6_ext", |
| "//src/connectivity/network/testing/network-test-realm/fidl:fuchsia.net.test.realm_rust", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/network/fidl_fuchsia_net_ext", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:tracing", |
| "//third_party/rust_crates:uuid", |
| ] |
| test_deps = [ |
| "//sdk/fidl/fuchsia.net:fuchsia.net_rust", |
| "//src/connectivity/lib/net-declare", |
| "//src/lib/fuchsia-async", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:futures", |
| ] |
| args_sources = [ "src/args.rs" ] |
| sources = [ "src/lib.rs" ] |
| } |
| |
| ffx_tool("ffx_net_test_realm_tool") { |
| edition = "2021" |
| output_name = "ffx-net-test-realm" |
| deps = [ |
| ":ffx_net_test_realm", |
| "//src/developer/ffx/lib/fho:lib", |
| "//src/lib/fuchsia-async", |
| ] |
| sources = [ "src/main.rs" ] |
| } |
| |
| group("tests") { |
| deps = [ ":ffx_net_test_realm_tests" ] |
| testonly = true |
| } |