| # 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/test.gni") |
| import( |
| "//src/lib/testing/expectation/fuchsia_test_component_with_expectations.gni") |
| |
| test("bin") { |
| output_name = "external_network_client" |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| "//src/connectivity/network/tests:os", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/system/ulib/fbl", |
| ] |
| |
| # TODO(https://fxbug.dev/42085293): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-vla-cxx-extension" ] |
| } |
| |
| fuchsia_unittest_component("client") { |
| manifest = "meta/client.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_test_component("device-name-provider") { |
| manifest = "meta/device-name-provider.cml" |
| deps = [ "//src/bringup/bin/device-name-provider" ] |
| } |
| |
| common_deps = [ |
| ":client", |
| ":device-name-provider", |
| ] |
| |
| fuchsia_test_component_with_expectations("ns3-tests") { |
| expectations = "expects/netstack3.json5" |
| manifest = "meta/netstack3.cml" |
| deps = common_deps + [ "//src/connectivity/network/testing/netemul/configurable-netstack:configurable-netstack-netstack3" ] |
| } |
| |
| fuchsia_test_package("ns3-external-network-tests") { |
| test_components = [ ":ns3-tests" ] |
| deps = [ "//src/lib/testing/expectation:expectation_comparer" ] |
| } |
| |
| all_test_targets = [ ":ns3-external-network-tests" ] |
| |
| # The Go runtime on Fuchsia does not support RISC-V. |
| if (target_cpu != "riscv64") { |
| fuchsia_test_component_with_expectations("ns2-tests") { |
| expectations = "expects/netstack2.json5" |
| manifest = "meta/netstack2.cml" |
| deps = |
| common_deps + |
| [ "//src/connectivity/network/testing/netemul/configurable-netstack" ] |
| } |
| |
| fuchsia_test_package("ns2-external-network-tests") { |
| test_components = [ ":ns2-tests" ] |
| deps = [ "//src/lib/testing/expectation:expectation_comparer" ] |
| } |
| |
| all_test_targets += [ ":ns2-external-network-tests" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = all_test_targets |
| |
| if (host_os == "linux") { |
| public_deps += [ ":client($host_toolchain)" ] |
| } |
| } |