| # 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/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| source_set("constants") { |
| sources = [ "constants.h" ] |
| } |
| |
| source_set("mixer") { |
| public_configs = [ "..:audio_core_config" ] |
| sources = [ |
| "channel_strip.h", |
| "coefficient_table.h", |
| "filter.cc", |
| "filter.h", |
| "frames.h", |
| "gain.cc", |
| "gain.h", |
| "linear_sampler.cc", |
| "linear_sampler.h", |
| "mixer.cc", |
| "mixer.h", |
| "mixer_utils.h", |
| "no_op.cc", |
| "no_op.h", |
| "output_producer.cc", |
| "output_producer.h", |
| "point_sampler.cc", |
| "point_sampler.h", |
| "position_manager.cc", |
| "position_manager.h", |
| "sinc_sampler.cc", |
| "sinc_sampler.h", |
| ] |
| |
| public_deps = [ |
| ":constants", |
| "//sdk/fidl/fuchsia.media", |
| "//src/media/audio/lib/logging", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/ffl", |
| "//zircon/public/lib/trace", |
| ] |
| |
| deps = [ |
| "//sdk/lib/media/cpp:no_converters", |
| "//src/lib/syslog/cpp", |
| ] |
| |
| # TODO(46722): UBSan has found an instance of undefined behavior in this target. |
| # Disable UBSan for this target temporarily until it is migrated into CI/CQ. |
| configs += [ "//build/config:temporarily_disable_ubsan_do_not_use" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":audio_mixer_unittests", |
| "test", |
| ] |
| } |
| |
| test_package("audio_mixer_unittests") { |
| deps = [ ":unittest_bin" ] |
| |
| tests = [ |
| { |
| name = "audio_mixer_unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| executable("unittest_bin") { |
| testonly = true |
| output_name = "audio_mixer_unittests" |
| |
| sources = [ |
| "bookkeeping_unittest.cc", |
| "channel_strip_unittest.cc", |
| "coefficient_table_unittest.cc", |
| "filter_unittest.cc", |
| "gain_unittest.cc", |
| "linear_sampler_unittest.cc", |
| "mixer_utils_unittest.cc", |
| "output_producer_unittest.cc", |
| "point_sampler_unittest.cc", |
| "position_manager_unittest.cc", |
| "sinc_sampler_unittest.cc", |
| ] |
| |
| deps = [ |
| ":mixer", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//zircon/public/lib/fbl", |
| ] |
| } |