blob: 9f82ed475716f14cc9f3e89a17da408668202044 [file] [log] [blame]
# 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("//src/media/audio/hardware.gni")
group("test") {
testonly = true
# These tests must run in release builds because they have hard realtime constraints.
# Debug builds are too slow.
# TODO(fxbug.dev/65608): Split into tests that have realtime constraints and tests that do not.
if (!is_debug) {
deps = [ ":audio_driver_tests" ]
}
}
test_package("audio_driver_tests") {
deps = [ ":audio_driver_tests_bin" ]
tests = [
{
name = "audio_driver_tests"
# This test is intended to be run on real hardware, although it can also run on virtual_audio.
# virtual_audio is not automatically loaded (or involved in any way), but if loaded ahead of
# time, it successfully runs and passes, just like any other audio driver.
environments = hardware_envs
},
]
}
executable("audio_driver_tests_bin") {
testonly = true
output_name = "audio_driver_tests"
sources = [
"admin_test.cc",
"admin_test.h",
"audio_device_enumerator_stub.cc",
"audio_device_enumerator_stub.h",
"basic_test.cc",
"basic_test.h",
"main.cc",
"test_base.cc",
"test_base.h",
]
deps = [
"//sdk/fidl/fuchsia.hardware.audio",
"//sdk/fidl/fuchsia.media",
"//sdk/lib/sys/cpp",
"//sdk/lib/sys/cpp/testing:enclosing_environment",
"//src/lib/fsl",
"//src/lib/fxl/test:test_settings",
"//src/lib/testing/loop_fixture",
"//src/media/audio/lib/logging",
"//src/media/audio/lib/test:message_transceiver",
"//src/media/audio/lib/test:test_fixture",
"//zircon/system/ulib/fzl",
]
}