| # Copyright 2020 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. |
| |
| # Clock-related utility functions, for audio tests, tools or drivers |
| |
| import("//build/test/test_package.gni") |
| |
| source_set("clock") { |
| public_deps = [ |
| ":clone_mono", |
| ":pid", |
| ":utils", |
| ] |
| } |
| |
| source_set("clone_mono") { |
| sources = [ |
| "clone_mono.cc", |
| "clone_mono.h", |
| ] |
| |
| deps = [ "//sdk/lib/syslog/cpp" ] |
| |
| public_deps = [ "//zircon/public/lib/zx" ] |
| } |
| |
| source_set("pid") { |
| sources = [ |
| "pid_control.cc", |
| "pid_control.h", |
| ] |
| |
| deps = [ |
| "//sdk/lib/syslog/cpp", |
| "//zircon/public/lib/zx", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| source_set("utils") { |
| sources = [ |
| "utils.cc", |
| "utils.h", |
| ] |
| |
| deps = [ "//sdk/lib/syslog/cpp" ] |
| |
| public_deps = [ |
| "//src/media/audio/lib/timeline", |
| "//zircon/public/lib/affine", |
| "//zircon/public/lib/fit", |
| "//zircon/public/lib/zx", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| executable("unittest_bin") { |
| visibility = [ ":*" ] |
| testonly = true |
| output_name = "audio-libclock-unittests" |
| |
| sources = [ |
| "clone_mono_unittest.cc", |
| "pid_control_unittest.cc", |
| "utils_unittest.cc", |
| ] |
| |
| deps = [ |
| ":clock", |
| "//sdk/lib/syslog/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/media/audio/lib/clock/testing", |
| "//src/zircon/lib/zircon", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| test_package("audio-libclock-unittests") { |
| deps = [ ":unittest_bin" ] |
| |
| tests = [ |
| { |
| name = "audio-libclock-unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":audio-libclock-unittests" ] |
| } |