| # Copyright 2023 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_binary.gni") |
| import( |
| "//src/lib/testing/expectation/fuchsia_test_component_with_expectations.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":iperf-test" ] |
| } |
| |
| rustc_test("test") { |
| edition = "2021" |
| name = "iperf_test" |
| sources = [ "src/lib.rs" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.device:fuchsia.device_rust", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_rust", |
| "//src/connectivity/lib/net-types", |
| "//src/connectivity/network/testing/netemul/fidl:fuchsia.netemul_rust", |
| "//src/connectivity/network/testing/netemul/rust:lib", |
| "//src/connectivity/network/tests/integration/common:netstack_testing_common", |
| "//src/connectivity/network/tests/integration/macros:netstack_testing_macros", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/sys/lib/component-events", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:test-case", |
| ] |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_component("iperf-component") { |
| component_name = "iperf" |
| manifest = "meta/iperf.cml" |
| deps = [ "//third_party/iperf:bin" ] |
| } |
| |
| fuchsia_test_component_with_expectations("iperf-test-component") { |
| component_name = "iperf-test" |
| manifest = "meta/iperf-test.cml" |
| expectations = "expectations.json5" |
| deps = [ ":test" ] |
| } |
| |
| fuchsia_test_package("iperf-test") { |
| test_components = [ ":iperf-test-component" ] |
| deps = [ |
| ":iperf-component", |
| "//src/bringup/bin/device-name-provider:component", |
| "//src/connectivity/network/netstack:component-debug", |
| "//src/connectivity/network/netstack3:component-debug", |
| "//src/connectivity/network/testing/netemul/service:netemul-sandbox", |
| "//src/lib/testing/expectation:expectation_comparer", |
| ] |
| } |