| # Copyright 2018 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") |
| |
| group("test") { |
| testonly = true |
| |
| # Only run on release builds to properly test fidelity and avoid flakes. |
| if (!is_debug) { |
| deps = [ ":audio_fidelity_tests" ] |
| } |
| } |
| |
| source_set("frequency_set") { |
| sources = [ |
| "frequency_set.cc", |
| "frequency_set.h", |
| ] |
| } |
| |
| executable("audio_fidelity_test_bin") { |
| visibility = [ ":*" ] |
| testonly = true |
| output_name = "audio_fidelity_tests" |
| |
| sources = [ |
| "audio_result.cc", |
| "audio_result.h", |
| "fidelity_main.cc", |
| "mixer_range_tests.cc", |
| "mixer_response_tests.cc", |
| "mixer_tests_recap.cc", |
| "mixer_tests_recap.h", |
| "mixer_tests_shared.cc", |
| "mixer_tests_shared.h", |
| ] |
| |
| deps = [ |
| ":frequency_set", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fxl/test:test_settings", |
| "//src/lib/testing/loop_fixture", |
| "//src/media/audio/audio_core/mixer", |
| "//src/media/audio/audio_core/mixer:prebuilt_coefficient_tables", |
| "//src/media/audio/lib/analysis", |
| "//src/media/audio/lib/format", |
| "//src/media/audio/lib/processing", |
| "//third_party/googletest:gmock", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| fuchsia_test_component("audio_fidelity_test_comp") { |
| manifest = "meta/audio_fidelity_tests.cml" |
| deps = [ ":audio_fidelity_test_bin" ] |
| } |
| |
| # Note: audio_core/mixer sets specific compiler flags for floating-point optimization which may make |
| # audio_fidelity_tests sensitive to toolchain changes. If non-audio changes cause failures, disable |
| # this test, contact Fuchsia media (tq-media-team@) and file a bug against the "Media>audio" area. |
| fuchsia_test_package("audio_fidelity_tests") { |
| test_specs = { |
| environments = [ emu_env ] |
| |
| log_settings = { |
| max_severity = "INFO" |
| } |
| |
| parallel = 4 |
| } |
| |
| test_components = [ ":audio_fidelity_test_comp" ] |
| } |