blob: 6fa0922b2e7879b82e63691874dff65bf906d628 [file] [log] [blame]
# Copyright 2019 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/config.gni")
import("//src/sys/build/components.gni")
group("tests") {
testonly = true
deps = [
":netstack-integration-tests",
"ip_forward:netemul-ip-forward-tests",
]
}
tests = [
"cobalt",
"dhcp",
"dns",
"fidl",
"inspect",
"ipv6",
"management",
"neighbor",
"routes",
"socket",
]
foreach(test, tests) {
name = "netstack_${test}_integration_test"
fuchsia_component(name) {
testonly = true
manifest = "meta/${name}.cmx"
deps = [ test ]
}
}
fuchsia_test_package("netstack-integration-tests") {
package_name = "netstack-integration-tests"
# TODO(fxbug.dev/62551)): avoid these error logs:
# [netstack,@set_interface_status] ERROR: netstack_service.go(345): (NIC 2).setState(enabled=false): not found
# [netstack,ndp,@test_down_close_race_eth] ERROR: ndp.go(544): DAD for fe80::2644:e5a7:b11a:bf9e on nicID (7) encountered error = endpoint is closed for send, sending interface changed event...
# [netstack,ndp,@test_down_close_race_eth] ERROR: ndp.go(544): DAD for fe80::c25:a6ff:fe82:5059 on nicID (7) encountered error = endpoint is closed for send, sending interface changed event...
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
test_components = []
foreach(test, tests) {
test_components += [ ":netstack_${test}_integration_test" ]
}
deps = [
# device_name_provider provides fuchsia.device.NameProvider.
"..:device_name_provider",
# mock_cobalt provides fuchsia.cobalt.LoggerFactory and fuchsia.cobalt.test.LoggerQuerier.
"//src/cobalt/bin/testing/mock_cobalt:component",
# stash_secure is used by dhcpd and netstack.
"//src/sys/stash:stash_secure",
# dhcpd is used to test DHCP address acquisition.
"//src/connectivity/network/dhcp:component",
# DHCPv6 client is under test.
"//src/connectivity/network/dhcpv6/client:component",
# dns_resolver integration with netstack is tested.
"//src/connectivity/network/dns:component",
# netcfg integration with netstack is tested.
":netcfg-netemul-config",
"//src/connectivity/network/netcfg:component-netemul",
# netstack3 is under test.
"//src/connectivity/network/netstack3:component",
# netstack is under test.
"//src/connectivity/network/netstack:component-debug",
# network_manager integration with netstack is tested.
":network-manager-config",
"//src/connectivity/management/network-manager:component-netemul",
# netemul-sandbox is used to create hermetic environments.
"//src/connectivity/network/testing/netemul/runner:netemul-sandbox-component",
]
}
config_data("netcfg-netemul-config") {
testonly = true
for_pkg = "netstack-integration-tests"
sources = [ "//src/connectivity/network/netcfg/config/empty.json" ]
outputs = [ "netcfg/empty.json" ]
}
config_data("network-manager-config") {
testonly = true
for_pkg = "netstack-integration-tests"
sources =
[ "//src/connectivity/management/network-manager/config/default.json" ]
outputs = [ "factory_config.json" ]
}