| # Copyright 2024 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_test.gni") |
| |
| rustc_test("net-cli-integration") { |
| edition = "2024" |
| output_name = "net_cli_integration_test" |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.net:fuchsia.net_rust", |
| "//sdk/fidl/fuchsia.net.filter:fuchsia.net.filter_rust", |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_rust", |
| "//sdk/fidl/fuchsia.net.interfaces.admin:fuchsia.net.interfaces.admin_rust", |
| "//sdk/fidl/fuchsia.net.routes.admin:fuchsia.net.routes.admin_rust", |
| "//src/connectivity/lib/net-declare", |
| "//src/connectivity/lib/net-types", |
| "//src/connectivity/network/net-cli:lib", |
| "//src/connectivity/network/testing/netemul/rust:lib", |
| "//src/connectivity/network/testing/network-test-realm/fidl:fuchsia.net.test.realm_rust", |
| "//src/connectivity/network/testing/network-test-realm/service:network_test_realm", |
| "//src/connectivity/network/tests/integration/common:netstack_testing_common", |
| "//src/developer/lib/writer:lib", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/network/fidl_fuchsia_net_filter_ext", |
| "//src/lib/network/fidl_fuchsia_net_interfaces_ext", |
| "//src/lib/network/fidl_fuchsia_net_matchers_ext", |
| "//src/lib/network/fidl_fuchsia_net_routes_ext", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:test-case", |
| ] |
| sources = [ |
| "src/filter.rs", |
| "src/lib.rs", |
| ] |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_test_component("net-cli-integration-test") { |
| manifest = "meta/net-cli-integration-test.cml" |
| deps = [ ":net-cli-integration" ] |
| } |
| |
| fuchsia_test_package("net-cli-integration-tests") { |
| test_components = [ ":net-cli-integration-test" ] |
| deps = [ |
| # netemul-sandbox is used to create hermetic test realms. |
| "//src/connectivity/network/testing/netemul/service:netemul-sandbox", |
| |
| # controller is used to interact with the Network Test Realm. |
| "//src/connectivity/network/testing/network-test-realm/service:controller", |
| |
| # component-debug corresponds to a Netstack3 instance configured by netemul. |
| "//src/connectivity/network/netstack3:component-debug", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":net-cli-integration-tests" ] |
| } |