| # 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/test.gni") |
| import("//build/test/test_package.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| import("//src/sys/cmc/build/cml.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":driver_manager_tests" ] |
| } |
| |
| # Common source files and dependencies between :coordinator and :test |
| source_set("lib") { |
| visibility = [ ":*" ] |
| |
| sources = [ |
| "binding.cc", |
| "binding_internal.h", |
| "component_lifecycle.cc", |
| "component_lifecycle.h", |
| "composite_device.cc", |
| "coordinator.cc", |
| "coordinator.h", |
| "devfs.cc", |
| "devfs.h", |
| "device.cc", |
| "device.h", |
| "driver.cc", |
| "driver.h", |
| "driver_host.cc", |
| "driver_host.h", |
| "driver_host_loader_service.cc", |
| "driver_host_loader_service.h", |
| "driver_test_reporter.cc", |
| "driver_test_reporter.h", |
| "env.cc", |
| "fdio.cc", |
| "fidl.cc", |
| "init_task.cc", |
| "inspect.cc", |
| "resume_task.cc", |
| "suspend_task.cc", |
| "system_instance.cc", |
| "system_instance.h", |
| "task.cc", |
| "unbind_task.cc", |
| "vmo_writer.cc", |
| ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_c", |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol", |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol_c", |
| "//sdk/fidl/fuchsia.hardware.power.statecontrol:fuchsia.hardware.power.statecontrol_llcpp", |
| "//sdk/fidl/fuchsia.hardware.virtioconsole:fuchsia.hardware.virtioconsole_llcpp", |
| "//sdk/fidl/fuchsia.process.lifecycle:fuchsia.process.lifecycle_llcpp", |
| "//sdk/lib/fidl/cpp", |
| "//sdk/lib/sys/cpp", |
| "//src/devices/lib/log", |
| "//src/storage/deprecated-fs-fidl-handler", |
| "//zircon/public/lib/async-default", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/devmgr-launcher", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/fidl-async", |
| "//zircon/public/lib/fidl-async-cpp", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/fs", |
| "//zircon/public/lib/fzl", |
| "//zircon/public/lib/inspect", |
| "//zircon/public/lib/inspector", |
| "//zircon/public/lib/libzbi", |
| "//zircon/public/lib/memfs", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/fidl/fuchsia-boot:c", |
| "//zircon/system/fidl/fuchsia-boot:llcpp", |
| "//zircon/system/fidl/fuchsia-device-manager", |
| "//zircon/system/fidl/fuchsia-device-manager:c", |
| "//zircon/system/fidl/fuchsia-device-manager:llcpp", |
| "//zircon/system/fidl/fuchsia-fshost:llcpp", |
| "//zircon/system/fidl/fuchsia-io:c", |
| "//zircon/system/fidl/fuchsia-ldsvc:llcpp", |
| "//zircon/system/fidl/fuchsia-mem:c", |
| "//zircon/system/ulib/driver-info", |
| "//zircon/system/ulib/loader-service", |
| "//zircon/system/ulib/svc", |
| ] |
| |
| defines = [ "_ALL_SOURCE=1" ] |
| } |
| |
| executable("driver_manager") { |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| ":lib", |
| "//src/sys/lib/stdout-to-debuglog", |
| ] |
| |
| defines = [ "_ALL_SOURCE=1" ] |
| } |
| |
| cm("driver_manager.cm") { |
| data = rebase_path("meta/driver_manager.cml") |
| } |
| |
| test("driver_manager_test") { |
| sources = [ |
| "binding_test.cc", |
| "composite_device_tests.cc", |
| "coordinator_test_utils.cc", |
| "init_tests.cc", |
| "inspect_test.cc", |
| "misc_tests.cc", |
| "multiple_device_test.cc", |
| "multiple_device_test_utils.cc", |
| "resume_tests.cc", |
| "suspend_tests.cc", |
| "system_instance_test.cc", |
| "task_test.cc", |
| "unbind_tests.cc", |
| ] |
| |
| deps = [ |
| ":lib", |
| "//zircon/public/lib/mock-boot-arguments", |
| "//zircon/public/lib/zxtest", |
| ] |
| |
| # TODO(46714): Fix the leaks and remove this. |
| deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| } |
| |
| test_package("driver_manager_tests") { |
| deprecated_shell = true |
| |
| deps = [ ":driver_manager_test" ] |
| |
| binaries = [ |
| { |
| name = "driver_manager_test" |
| }, |
| ] |
| |
| tests = [ |
| { |
| name = "driver_manager_test" |
| environments = basic_envs |
| }, |
| ] |
| } |