| # 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/components.gni") |
| import("//build/test.gni") |
| import("//src/media/audio/hardware.gni") |
| |
| group("tests") { |
| testonly = true |
| |
| deps = [ ":audio_driver_tests" ] |
| |
| # Certain test cases (e.g. position accuracy) are disabled by default (enabled by cmdline flag). |
| # They have hard realtime constraints; debug builds are too slow. |
| # TODO(https://fxbug.dev/42144328): Enable these cases in a new suite that runs only in realtime envs. |
| } |
| |
| fuchsia_unittest_package("audio_driver_tests") { |
| manifest = "meta/audio_driver_tests.cml" |
| deps = [ |
| ":audio_driver_tests_bin", |
| "//src/connectivity/bluetooth/tests/audio-device-output-harness", |
| ] |
| |
| # This test is intended to be run on real hardware, and optionally on virtual_audio instances |
| # and a virtualized Bluetooth a2dp driver. |
| test_specs = { |
| environments = hardware_envs + basic_envs |
| } |
| test_type = "device" |
| } |
| |
| executable("audio_driver_tests_bin") { |
| testonly = true |
| output_name = "audio_driver_tests" |
| |
| sources = [ |
| "//src/media/audio/drivers/virtual_audio/virtual_audio.h", |
| "admin_test.cc", |
| "admin_test.h", |
| "audio_device_enumerator_stub.cc", |
| "audio_device_enumerator_stub.h", |
| "basic_test.cc", |
| "basic_test.h", |
| "device_host.cc", |
| "device_host.h", |
| "main.cc", |
| "position_test.cc", |
| "position_test.h", |
| "test_base.cc", |
| "test_base.h", |
| ] |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.component:fuchsia.component_hlcpp", |
| "//sdk/fidl/fuchsia.hardware.audio:fuchsia.hardware.audio_hlcpp", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_hlcpp", |
| "//sdk/fidl/fuchsia.media:fuchsia.media_hlcpp", |
| "//sdk/fidl/fuchsia.virtualaudio:fuchsia.virtualaudio_hlcpp", |
| "//sdk/lib/sys/component/cpp/testing:cpp_library", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fsl", |
| "//src/lib/fuchsia-component-test/realm_builder_server:realm_builder_server_component", |
| "//src/lib/fxl:fxl_cli", |
| "//src/lib/fxl/test:test_settings", |
| "//src/lib/testing/loop_fixture", |
| "//src/media/audio/lib/test:test_fixture", |
| "//zircon/system/public", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/sync:sync-cpp", |
| ] |
| } |