blob: be6408ff1fc628c119848eb90b18203a11024690 [file] [log] [blame]
# Copyright 2018 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("//src/sys/build/components.gni")
group("test") {
testonly = true
deps = [
":grpc_client_stress_test_spec",
":guest_test_spec",
":netemul-sandbox-test",
"dummy_proc",
"dynamic_devices",
"easy_netstack_cfg",
"env_build",
"guest",
"guest_grpc_stress",
"inheritance",
"netstack_socks",
"network_device",
"sandbox_service",
"svc_list",
"virtual_device_directory",
]
}
fuchsia_component("dynamic-devices-test") {
manifest = "meta/dynamic-devices-test.cmx"
testonly = true
deps = [ "dynamic_devices" ]
}
fuchsia_component("easy-netstack-cfg-test") {
manifest = "meta/easy-netstack-cfg-test.cmx"
testonly = true
deps = [ "easy_netstack_cfg" ]
}
fuchsia_component("env-build-test") {
manifest = "meta/env-build-test.cmx"
testonly = true
deps = [ "env_build" ]
}
fuchsia_component("inheritance-test") {
manifest = "meta/inheritance-test.cmx"
testonly = true
deps = [ "inheritance" ]
}
fuchsia_component("netstack-intermediary-multi-interface-test") {
manifest = "meta/netstack-intermediary-multi-interface-test.cmx"
testonly = true
deps = [ "netstack_intermediary" ]
}
fuchsia_component("netstack-intermediary-test") {
manifest = "meta/netstack-intermediary-test.cmx"
testonly = true
deps = [ "netstack_intermediary" ]
}
fuchsia_component("netstack-socks-test") {
manifest = "meta/netstack-socks-test.cmx"
testonly = true
deps = [ "netstack_socks" ]
}
fuchsia_component("svc-list-test") {
manifest = "meta/svc-list-test.cmx"
testonly = true
deps = [ "svc_list" ]
}
fuchsia_component("virtual-device-directory-test") {
manifest = "meta/virtual-device-directory-test.cmx"
testonly = true
deps = [ "virtual_device_directory" ]
}
fuchsia_component("network-device-test") {
manifest = "meta/network-device-test.cmx"
testonly = true
deps = [ "network_device" ]
}
fuchsia_component("sandbox-service") {
manifest = "meta/sandbox-service.cmx"
testonly = true
deps = [ "sandbox_service" ]
}
fuchsia_component("sandbox-unittest") {
manifest = "meta/sandbox-unittest.cmx"
testonly = true
deps =
[ "//src/connectivity/network/testing/netemul/runner:sandbox_unittest" ]
}
fuchsia_component("mock-device-settings") {
manifest = "meta/mock-device-settings.cmx"
testonly = true
deps = [ "//src/connectivity/network/testing/netemul/runner/helpers/mock_device_settings:mock_device_settings_test" ]
}
fuchsia_component("model-unittest") {
manifest = "meta/model-unittest.cmx"
testonly = true
deps = [
"//src/connectivity/network/testing/netemul/runner/model:model_unittest",
]
}
fuchsia_test_package("netemul-sandbox-test") {
test_components = [
":dynamic-devices-test",
":easy-netstack-cfg-test",
":env-build-test",
":inheritance-test",
":mock-device-settings",
":model-unittest",
":netstack-intermediary-multi-interface-test",
":netstack-intermediary-test",
":netstack-socks-test",
":network-device-test",
":sandbox-service",
":sandbox-unittest",
":svc-list-test",
":virtual-device-directory-test",
]
deps = [
"dummy_proc",
"dummy_proc:dummy_proc_with_dev",
]
test_specs = {
environments = [ emu_env ]
log_settings = {
max_severity = "ERROR"
}
}
}
fuchsia_component("guest-test") {
manifest = "meta/guest-test.cmx"
testonly = true
deps = [ "guest" ]
}
resource("test_script") {
sources = [ "//src/virtualization/lib/guest_interaction/test/test_script.sh" ]
outputs = [ "data/test_script.sh" ]
}
resource("setup_linux_client") {
sources = [ "multiple_guests/data/setup_linux_client.sh" ]
outputs = [ "data/setup_linux_client.sh" ]
}
resource("setup_linux_router") {
sources = [ "multiple_guests/data/setup_linux_router.sh" ]
outputs = [ "data/setup_linux_router.sh" ]
}
fuchsia_component("grpc-client-stress-test") {
manifest = "meta/grpc-client-stress-test.cmx"
testonly = true
deps = [ "guest_grpc_stress" ]
}
fuchsia_component("multiple-guests-test") {
manifest = "meta/multiple-guests-test.cmx"
testonly = true
deps = [ "multiple_guests" ]
}
fuchsia_test("guest_test_spec") {
package = ":netemul-guest-test"
component = ":guest-test"
# TODO(fxbug.dev/48129): test hangs w/ ASan. Fix and switch to [ nuc_env ].
environments = nuc_env_fails_on_asan
}
fuchsia_test("grpc_client_stress_test_spec") {
package = ":netemul-guest-test"
component = ":grpc-client-stress-test"
# TODO(fxbug.dev/47487): test hangs w/ ASan. Fix and switch to [ nuc_env ].
if (nuc_env_fails_on_asan != []) {
nuc_scope = nuc_env_fails_on_asan[0]
environments = [
{
dimensions = nuc_scope.dimensions
# TODO(fxbug.dev/49752): test occasionally exceeds 5 minute timeout.
tags = [ "flaky" ]
},
]
} else {
# Disable this test for all non-NUC environments.
environments = []
}
}
fuchsia_test("multiple_guests_test_spec") {
package = ":netemul-guest-test"
component = ":multiple-guests-test"
# TODO(fxbug.dev/48129): test hangs w/ ASan. Fix and switch to [ nuc_env ].
# TODO(fxbug.dev/51063): test fails with ThinLTO.
environments = []
}
fuchsia_package("netemul-guest-test") {
testonly = true
deps = [
":grpc-client-stress-test",
":guest-test",
":multiple-guests-test",
":setup_linux_client",
":setup_linux_router",
":test_script",
]
}