| # 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/bind/bind.gni") |
| import("//build/config/fuchsia/rules.gni") |
| import("//src/lib/isolated_devmgr/isolated_devmgr.gni") |
| import("//src/sys/build/components.gni") |
| |
| source_set("src") { |
| sources = [ |
| "isolated_devmgr.cc", |
| "isolated_devmgr.h", |
| ] |
| |
| public_deps = [ "//zircon/system/ulib/devmgr-integration-test" ] |
| |
| deps = [ |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/ddk", |
| "//src/lib/fxl", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/fdio-caller", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/inspector", |
| ] |
| } |
| |
| executable("isolated_devmgr") { |
| testonly = true |
| output_name = "isolated_devmgr" |
| |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| ":src", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/ddk", |
| "//src/lib/fxl", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fit", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/devmgr-integration-test", |
| ] |
| } |
| |
| static_library("usb-virtual-bus") { |
| testonly = true |
| sources = [ |
| "usb-virtual-bus-helper.cc", |
| "usb-virtual-bus-helper.h", |
| "usb-virtual-bus.cc", |
| "usb-virtual-bus.h", |
| ] |
| public_deps = [ |
| "//garnet/public/lib/gtest", |
| "//sdk/fidl/fuchsia.hardware.usb.peripheral:fuchsia.hardware.usb.peripheral_llcpp", |
| "//sdk/fidl/fuchsia.hardware.usb.virtual.bus:fuchsia.hardware.usb.virtual.bus_llcpp", |
| "//zircon/system/ulib/devmgr-integration-test", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/ddk", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/devmgr-launcher", |
| "//zircon/system/ulib/fidl-async:fidl-async-cpp", |
| ] |
| configs += [ |
| "//build/config/fuchsia:enable_zircon_asserts", |
| "//build/config/fuchsia:static_cpp_standard_library", |
| ] |
| } |
| |
| executable("test_bin") { |
| testonly = true |
| |
| output_name = "isolated_devmgr_tests" |
| |
| sources = [ "isolated_devmgr_tests.cc" ] |
| |
| deps = [ |
| ":src", |
| "//garnet/public/lib/gtest", |
| "//sdk/fidl/fuchsia.hardware.ethertap", |
| "//sdk/fidl/fuchsia.io:fuchsia.io", |
| "//sdk/fidl/fuchsia.sys", |
| "//sdk/fidl/fuchsia.virtualaudio", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/ddk", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/async-cpp", |
| "//zircon/public/lib/fit", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/devmgr-integration-test", |
| ] |
| } |
| |
| isolated_devmgr_component("ethertap-devmgr") { |
| args = [ |
| "--svc_name=fuchsia.example.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", |
| ] |
| } |
| |
| isolated_devmgr_component("virtual-audio-devmgr") { |
| args = [ |
| "--svc_name=fuchsia.example.IsolatedDevmgr", |
| "--load_driver=/boot/driver/virtual_audio_driver.so", |
| "--wait_for=test/virtual_audio", |
| ] |
| |
| deps = [ |
| "//src/devices/tests/sysdev", |
| "//src/media/audio/drivers/virtual_audio:virtual_audio_driver", |
| ] |
| } |
| |
| bind_rules("crash-device-bind") { |
| rules = "crash-device.bind" |
| output = "crash-device-bind.h" |
| deps = [ "//src/devices/bind/test.platform" ] |
| } |
| |
| # A device that causes a crash when it's operated on |
| driver_module("crash-device") { |
| sources = [ "crash_device.cc" ] |
| deps = [ |
| ":crash-device-bind", |
| "//src/devices/lib/driver", |
| "//src/lib/ddk", |
| "//src/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fidl", |
| "//zircon/system/ulib/fzl", |
| ] |
| } |
| |
| fuchsia_component("isolated-devmgr-tests") { |
| testonly = true |
| manifest = "isolated-devmgr-tests.cmx" |
| deps = [ |
| ":crash-device", |
| ":ethertap-devmgr", |
| ":test_bin", |
| ":virtual-audio-devmgr", |
| "//src/connectivity/ethernet/drivers/ethernet", |
| "//src/connectivity/ethernet/drivers/ethertap", |
| "//src/devices/board/drivers/integration-test", |
| "//src/devices/bus/drivers/platform", |
| "//src/devices/rtc/drivers/fallback", |
| "//src/devices/tests/sysdev", |
| ] |
| } |
| |
| fuchsia_test_package("isolated-devmgr-tests-package") { |
| test_components = [ ":isolated-devmgr-tests" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| data_deps = [ ":isolated-devmgr-tests-package" ] |
| } |