| # 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/components.gni") |
| |
| source_set("clock") { |
| sources = [ |
| "audio_clock_coefficients.h", |
| "clock.h", |
| "clock_snapshot.cc", |
| "clock_snapshot.h", |
| "clock_synchronizer.cc", |
| "clock_synchronizer.h", |
| "clone_mono.cc", |
| "clone_mono.h", |
| "logging.cc", |
| "logging.h", |
| "pid_control.cc", |
| "pid_control.h", |
| "real_clock.cc", |
| "real_clock.h", |
| "real_timer.cc", |
| "real_timer.h", |
| "recovered_clock.cc", |
| "recovered_clock.h", |
| "scoped_unique_lock.h", |
| "synthetic_clock.cc", |
| "synthetic_clock.h", |
| "synthetic_clock_realm.cc", |
| "synthetic_clock_realm.h", |
| "synthetic_timer.cc", |
| "synthetic_timer.h", |
| "timer.h", |
| "unadjustable_clock_wrapper.h", |
| "utils.cc", |
| "utils.h", |
| ] |
| |
| deps = [ "//sdk/lib/syslog/cpp" ] |
| |
| public_deps = [ |
| "//sdk/fidl/fuchsia.hardware.audio", |
| "//sdk/lib/fit-promise", |
| "//src/lib/fxl", |
| "//src/media/audio/lib/timeline", |
| "//third_party/googletest:gtest_prod", |
| "//zircon/system/ulib/affine", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| executable("unittest_bin") { |
| visibility = [ ":*" ] |
| testonly = true |
| output_name = "audio-libclock-unittests" |
| |
| sources = [ |
| "clock_snapshot_unittest.cc", |
| "clock_synchronizer_unittest.cc", |
| "clone_mono_unittest.cc", |
| "pid_control_unittest.cc", |
| "real_clock_unittest.cc", |
| "real_timer_unittest.cc", |
| "recovered_clock_unittest.cc", |
| "synthetic_clock_realm_unittest.cc", |
| "synthetic_clock_unittest.cc", |
| "synthetic_timer_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", |
| "//third_party/googletest:gmock", |
| "//zircon/system/ulib/sync:sync-cpp", |
| ] |
| } |
| |
| fuchsia_unittest_package("audio-libclock-unittests") { |
| deps = [ ":unittest_bin" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":audio-libclock-unittests" ] |
| } |