blob: fe7f3673b08ed1dc3bdc97779e7f2a11d07c2d16 [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/lib/isolated_devmgr/isolated_devmgr.gni")
import("//src/sys/build/components.gni")
group("runner") {
testonly = true
deps = [
":bin",
":netemul-sandbox",
":sandbox_unittest",
":src",
"helpers",
"model",
"runner",
"test",
]
}
source_set("src") {
testonly = true
sources = [
"format.cc",
"format.h",
"log_listener.cc",
"log_listener.h",
"log_listener_log_sink.cc",
"log_listener_log_sink.h",
"log_listener_ostream.cc",
"log_listener_ostream.h",
"managed_environment.cc",
"managed_environment.h",
"managed_launcher.cc",
"managed_launcher.h",
"managed_logger.cc",
"managed_logger.h",
"sandbox.cc",
"sandbox.h",
"sandbox_env.cc",
"sandbox_env.h",
"sandbox_service.cc",
"sandbox_service.h",
"virtual_devices.cc",
"virtual_devices.h",
]
deps = [
"//garnet/public/lib/json",
"//sdk/fidl/fuchsia.diagnostics",
"//sdk/fidl/fuchsia.kernel",
"//sdk/fidl/fuchsia.net",
"//sdk/fidl/fuchsia.net.stack",
"//sdk/fidl/fuchsia.netstack",
"//sdk/fidl/fuchsia.sys",
"//sdk/fidl/fuchsia.virtualization",
"//sdk/lib/fdio",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:enclosing_environment",
"//sdk/lib/syslog/cpp",
"//src/connectivity/network/testing/netemul/lib/fidl:devmgr",
"//src/connectivity/network/testing/netemul/lib/fidl:network",
"//src/connectivity/network/testing/netemul/lib/network:netdump",
"//src/connectivity/network/testing/netemul/lib/sync:sync_service",
"//src/lib/cmx",
"//src/lib/fsl",
"//src/lib/fxl",
"//src/lib/pkg_url",
"//src/virtualization/lib/guest_config",
"//src/virtualization/lib/guest_interaction:fuchsia.netemul.guest",
"//src/virtualization/tests:guest_console",
"//third_party/rapidjson",
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/zx",
"//zircon/system/ulib/async-default",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/memfs:memfs-cpp",
"//zircon/system/ulib/syslog",
]
public_deps = [
"model",
"//sdk/fidl/fuchsia.boot",
"//sdk/fidl/fuchsia.io",
"//sdk/fidl/fuchsia.logger:fuchsia.logger",
"//sdk/lib/sys/cpp",
"//src/connectivity/network/testing/netemul/lib/fidl:environment",
"//src/connectivity/network/testing/netemul/lib/fidl:sandbox",
"//src/connectivity/network/testing/netemul/lib/fidl:sync",
"//src/connectivity/network/testing/netemul/lib/network:network_service",
"//zircon/public/lib/async-cpp",
"//zircon/public/lib/fbl",
"//zircon/system/ulib/fs",
]
}
executable("bin") {
testonly = true
output_name = "netemul_sandbox"
sources = [ "main.cc" ]
deps = [
":src",
"//sdk/fidl/fuchsia.virtualization",
"//sdk/lib/sys/cpp",
"//src/lib/fxl",
"//third_party/rapidjson",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/memfs:memfs-cpp",
]
}
executable("sandbox_unittest") {
testonly = true
sources = [
"log_listener_ostream_unittest.cc",
"log_listener_test_helpers.cc",
"log_listener_test_helpers.h",
"logger_unittest.cc",
"managed_logger_unittest.cc",
"sandbox_unittest.cc",
]
deps = [
":src",
"//garnet/public/lib/gtest",
"//garnet/public/lib/json",
"//sdk/fidl/fuchsia.sys",
"//sdk/fidl/fuchsia.virtualization",
"//sdk/lib/fdio",
"//sdk/lib/sys/cpp/testing:integration",
"//src/diagnostics/archivist/fidl:controller",
"//src/lib/fsl",
"//src/lib/fxl",
"//src/lib/fxl/test:gtest_main",
"//src/lib/pkg_url",
"//src/lib/testing/predicates",
"//third_party/rapidjson",
"//zircon/system/ulib/async-loop:async-loop-cpp",
"//zircon/system/ulib/async-loop:async-loop-default",
"//zircon/system/ulib/memfs:memfs-cpp",
"//zircon/system/ulib/syslog",
]
}
fuchsia_component("netemul-sandbox-component") {
testonly = true
component_name = "netemul-sandbox"
manifest = "meta/netemul-sandbox.cmx"
deps = [
":bin",
":netemul-devmgr",
]
}
fuchsia_component("netstack-cfg") {
testonly = true
manifest = "helpers/meta/helper_netstack_cfg.cmx"
deps = [ "helpers/netstack_cfg" ]
}
fuchsia_component("mock-device-settings") {
testonly = true
manifest = "helpers/meta/mock_device_settings.cmx"
deps = [ "helpers/mock_device_settings" ]
}
fuchsia_component("netstack-intermediary") {
testonly = true
manifest = "helpers/meta/helper_netstack_intermediary.cmx"
deps = [ "helpers/netstack_intermediary" ]
}
isolated_devmgr_component("netemul-devmgr") {
args = [
"--svc_name=fuchsia.netemul.devmgr.IsolatedDevmgr",
"--load_driver=/boot/driver/ethertap.so",
"--load_driver=/boot/driver/ethernet.so",
"--wait_for=test/tapctl",
]
deps = [
"//src/connectivity/ethernet/drivers/ethernet",
"//src/connectivity/ethernet/drivers/ethertap",
"//src/devices/tests/sysdev",
]
}
fuchsia_package("netemul-sandbox") {
testonly = true
deps = [
":mock-device-settings",
":netemul-devmgr",
":netemul-sandbox-component",
":netstack-cfg",
":netstack-intermediary",
]
}