blob: 18f2e796ddac35c96a9a693703c48a5d2ad8a9d3 [file]
# Copyright 2021 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(
"//src/lib/testing/expectation/fuchsia_test_component_with_expectations.gni")
group("tests") {
testonly = true
deps = [
":netstack-error-fidl-tests",
":netstack-fidl-tests",
":netstack-fidl-tests-with-expectations",
]
}
tests = [
"debug",
"interfaces",
"neighbor",
"routes",
]
tests_with_expectations = [ "interfaces-admin" ]
foreach(test, tests) {
name = "netstack-${test}-fidl-test"
fuchsia_test_component(name) {
manifest = "meta/${name}.cml"
deps = [ test ]
}
}
foreach(test, tests_with_expectations) {
name = "netstack-${test}-fidl-test"
fuchsia_test_component_with_expectations(name) {
manifest = "meta/${name}.cml"
expectations = "expectations/${test}.json5"
deps = [ test ]
}
}
filter_tests = [
"nat",
"tcp",
"udp",
]
foreach(test, filter_tests) {
name = "netstack-${test}-filter-fidl-test"
fuchsia_test_component(name) {
manifest = "meta/netstack-${test}-filter-fidl-test.cml"
deps = [ "filter/${test}" ]
}
}
_common_test_package_deps = [
# netemul-sandbox is used to create hermetic test realms.
"//src/connectivity/network/testing/netemul/service:netemul-sandbox",
# netstack is under test.
"//src/connectivity/network/netstack:component-debug",
# netstack3 is under test.
"//src/connectivity/network/netstack3:component-debug",
]
fuchsia_test_package("netstack-fidl-tests-with-expectations") {
test_components = []
foreach(test, tests_with_expectations) {
test_components += [ ":netstack-${test}-fidl-test" ]
}
deps = _common_test_package_deps +
[ "//src/lib/testing/expectation:expectation_comparer" ]
# TODO(https://fxbug.dev/65359): Figure out how to allow high-severity logs
# in expected-to-fail tests.
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
fuchsia_test_package("netstack-fidl-tests") {
test_components = []
foreach(test, tests) {
test_components += [ ":netstack-${test}-fidl-test" ]
}
foreach(test, filter_tests) {
test_components += [ ":netstack-${test}-filter-fidl-test" ]
}
deps = _common_test_package_deps
}
fuchsia_test_component("netstack-interfaces-error-fidl-test") {
manifest = "meta/netstack-interfaces-error-fidl-test.cml"
deps = [ "interfaces:error" ]
}
# TODO(https://fxbug.dev/65359): Merge this with the above package once it is
# supported to configure acceptable error log lines.
fuchsia_test_package("netstack-error-fidl-tests") {
test_components = [ ":netstack-interfaces-error-fidl-test" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
deps = _common_test_package_deps
}