| # 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/testing/environments.gni") |
| import("//src/lib/isolated_devmgr/devmgr_manifest.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":driver_host_tests" ] |
| } |
| |
| executable("driver_host") { |
| sources = [ "main.cc" ] |
| |
| deps = [ |
| ":common", |
| ":driver", |
| ] |
| } |
| |
| source_set("common") { |
| sources = [ |
| "api.cc", |
| "composite_device.cc", |
| "connection_destroyer.cc", |
| "core.cc", |
| "devfs_vnode.cc", |
| "device_controller_connection.cc", |
| "driver_host.cc", |
| "driver_host_context.cc", |
| "env.cc", |
| "proxy_iostate.cc", |
| "scheduler_profile.cc", |
| "tracing.cc", |
| "zx_device.cc", |
| ] |
| |
| public_deps = [ |
| "//sdk/banjo/ddk.protocol.composite", |
| "//src/devices/lib/log", |
| "//src/storage/deprecated-fs-fidl-handler", |
| "//zircon/public/lib/async-loop-cpp", |
| "//zircon/public/lib/async-loop-default", |
| "//zircon/public/lib/ddk", |
| "//zircon/public/lib/ddktl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/fdio", |
| "//zircon/public/lib/fidl", |
| "//zircon/public/lib/fidl-async", |
| "//zircon/public/lib/fs", |
| "//zircon/public/lib/sync", |
| "//zircon/public/lib/trace", |
| "//zircon/public/lib/trace-provider-with-fdio", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxio", |
| "//zircon/system/fidl/fuchsia-device:llcpp", |
| "//zircon/system/fidl/fuchsia-device-manager:c", |
| "//zircon/system/fidl/fuchsia-device-manager:llcpp", |
| "//zircon/system/fidl/fuchsia-io:c", |
| "//zircon/system/fidl/fuchsia-scheduler:c", |
| ] |
| |
| defines = [ "_ALL_SOURCE=1" ] |
| configs += [ "//build/config/fuchsia:static_cpp_standard_library" ] |
| } |
| |
| shared_library("driver") { |
| sources = [] |
| |
| deps = [ ":common" ] |
| } |
| |
| test("driver_host_test") { |
| sources = [ |
| "core_test.cc", |
| "device_api_test.cc", |
| "device_controller_connection_test.cc", |
| "device_controller_integration_test.cc", |
| "driver_host_test.cc", |
| "proxy_iostate_test.cc", |
| ] |
| |
| deps = [ |
| ":common", |
| "//sdk/fidl/fuchsia.device.test:fuchsia.device.test_llcpp", |
| "//zircon/public/lib/fidl-async-cpp", |
| "//zircon/public/lib/zxtest", |
| "//zircon/system/ulib/devmgr-integration-test", |
| "//zircon/system/ulib/driver-integration-test", |
| ] |
| |
| # TODO(46713): Fix the leaks and remove this. |
| deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| } |
| |
| devmgr_manifest("devmgr-manifest") { |
| } |
| |
| test_package("driver_host_tests") { |
| deps = [ |
| ":devmgr-manifest", |
| ":driver_host_test", |
| ] |
| |
| binaries = [ |
| { |
| name = "driver_host_test" |
| }, |
| ] |
| extra = [ "$target_gen_dir/devmgr.manifest" ] |
| tests = [ |
| { |
| name = "driver_host_test" |
| environments = basic_envs |
| }, |
| ] |
| } |