| # 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("//build/package.gni") |
| import("//src/lib/isolated_devmgr/devmgr_manifest.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/lib/process", |
| "//garnet/public/lib/json", |
| "//garnet/public/lib/syslog/cpp", |
| "//sdk/fidl/fuchsia.net.stack", |
| "//sdk/fidl/fuchsia.netstack", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/fidl/fuchsia.sysinfo", |
| "//sdk/fidl/fuchsia.virtualization", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/sys/cpp/testing:enclosing_environment", |
| "//src/connectivity/network/testing/netemul/lib/fidl:devmgr", |
| "//src/connectivity/network/testing/netemul/lib/fidl:environment", |
| "//src/connectivity/network/testing/netemul/lib/fidl:network", |
| "//src/connectivity/network/testing/netemul/lib/fidl:sandbox", |
| "//src/connectivity/network/testing/netemul/lib/fidl:sync", |
| "//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/bin/vmm: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/async-default", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/memfs-cpp", |
| "//zircon/public/lib/zx", |
| "//zircon/system/fidl/fuchsia-net", |
| ] |
| |
| public_deps = [ |
| "model", |
| "//sdk/lib/sys/cpp", |
| "//src/connectivity/network/testing/netemul/lib/network:network_service", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fs", |
| "//zircon/system/fidl/fuchsia-io", |
| "//zircon/system/fidl/fuchsia-logger:fuchsia-logger", |
| ] |
| } |
| |
| 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/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/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/sys/cpp/testing:integration", |
| "//src/lib/fsl", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/pkg_url", |
| "//src/lib/testing/predicates", |
| "//third_party/rapidjson", |
| "//third_party/rapidjson", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/memfs-cpp", |
| ] |
| } |
| |
| package("netemul_sandbox") { |
| testonly = true |
| |
| deps = [ |
| ":bin", |
| "helpers", |
| ] |
| |
| binaries = [ |
| { |
| name = "netemul_sandbox" |
| }, |
| { |
| name = "netstack_cfg" |
| }, |
| { |
| name = "mock_device_settings" |
| }, |
| { |
| name = "guest_netstack_intermediary" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/netemul_sandbox.cmx") |
| dest = "netemul_sandbox.cmx" |
| }, |
| { |
| path = rebase_path("helpers/meta/helper_netstack_cfg.cmx") |
| dest = "helper_netstack_cfg.cmx" |
| }, |
| { |
| path = rebase_path("helpers/meta/mock_device_settings.cmx") |
| dest = "mock_device_settings.cmx" |
| }, |
| { |
| path = rebase_path("helpers/meta/helper_netstack_intermediary.cmx") |
| dest = "helper_netstack_intermediary.cmx" |
| }, |
| ] |
| } |
| |
| devmgr_manifest("devmgr_manifest") { |
| } |
| |
| package("netemul_devmgr") { |
| testonly = true |
| |
| deps = [ |
| ":devmgr_manifest", |
| "//src/lib/isolated_devmgr", |
| ] |
| |
| extra = [ "$target_gen_dir/devmgr.manifest" ] |
| |
| binaries = [ |
| { |
| name = "isolated_devmgr" |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = rebase_path("meta/netemul_devmgr.cmx") |
| dest = "netemul_devmgr.cmx" |
| }, |
| ] |
| } |