xref: /aosp_15_r20/external/webrtc/test/time_controller/BUILD.gn (revision d9f758449e529ab9291ac668be2861e7a55c2422)
1# Copyright (c) 2019 The WebRTC project authors. All Rights Reserved.
2#
3# Use of this source code is governed by a BSD-style license
4# that can be found in the LICENSE file in the root of the source
5# tree. An additional intellectual property rights grant can be found
6# in the file PATENTS.  All contributing project authors may
7# be found in the AUTHORS file in the root of the source tree.
8
9import("../../webrtc.gni")
10
11rtc_library("time_controller") {
12  testonly = true
13  sources = [
14    "external_time_controller.cc",
15    "external_time_controller.h",
16    "real_time_controller.cc",
17    "real_time_controller.h",
18    "simulated_task_queue.cc",
19    "simulated_task_queue.h",
20    "simulated_thread.cc",
21    "simulated_thread.h",
22    "simulated_time_controller.cc",
23    "simulated_time_controller.h",
24  ]
25
26  deps = [
27    "../../api:sequence_checker",
28    "../../api:time_controller",
29    "../../api/task_queue",
30    "../../api/task_queue:default_task_queue_factory",
31    "../../api/units:time_delta",
32    "../../api/units:timestamp",
33    "../../rtc_base",
34    "../../rtc_base:checks",
35    "../../rtc_base:null_socket_server",
36    "../../rtc_base:platform_thread_types",
37    "../../rtc_base:rtc_base_tests_utils",
38    "../../rtc_base:rtc_event",
39    "../../rtc_base/synchronization:mutex",
40    "../../rtc_base/synchronization:yield_policy",
41    "../../system_wrappers",
42  ]
43  absl_deps = [
44    "//third_party/abseil-cpp/absl/functional:any_invocable",
45    "//third_party/abseil-cpp/absl/strings",
46  ]
47}
48
49if (rtc_include_tests) {
50  rtc_library("time_controller_unittests") {
51    testonly = true
52    sources = [
53      "external_time_controller_unittest.cc",
54      "simulated_time_controller_unittest.cc",
55      "time_controller_conformance_test.cc",
56    ]
57    deps = [
58      ":time_controller",
59      "../:test_support",
60      "../../api:time_controller",
61      "../../api/units:time_delta",
62      "../../rtc_base",
63      "../../rtc_base:macromagic",
64      "../../rtc_base:rtc_event",
65      "../../rtc_base:rtc_task_queue",
66      "../../rtc_base:task_queue_for_test",
67      "../../rtc_base:threading",
68      "../../rtc_base/synchronization:mutex",
69      "../../rtc_base/task_utils:repeating_task",
70    ]
71  }
72}
73