blob: c0b3f17dec7a050ebcc70401c704f02683c66903 [file] [log] [blame]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +00001# Copyright (c) 2014 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
kjellander0f380d82016-06-01 04:48:26 -07009import("//build/config/ui.gni")
Robin Raymondce1b1402018-11-22 20:10:11 -050010import("../webrtc.gni")
kjellander0f380d82016-06-01 04:48:26 -070011if (is_android) {
12 import("//build/config/android/rules.gni")
13}
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000014
kjellanderb62dbbe2016-09-23 00:38:52 -070015group("test") {
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000016 testonly = true
17
18 deps = [
Artem Titov66a29b92019-01-15 14:43:20 +010019 ":copy_to_file_audio_capturer",
kjellander0f380d82016-06-01 04:48:26 -070020 ":rtp_test_utils",
21 ":test_common",
22 ":test_renderer",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000023 ":test_support",
kjellander0f380d82016-06-01 04:48:26 -070024 ":video_test_common",
Artem Titov4895b452019-01-14 16:54:04 +010025 "pc/e2e",
Artem Titovb6c62012019-01-08 14:58:23 +010026 "pc/e2e/api:peer_connection_quality_test_fixture_api",
kjellander0f380d82016-06-01 04:48:26 -070027 ]
mbonadei148d5a22017-04-28 05:24:50 -070028
oprypinfbbba3f2017-09-25 08:34:41 -070029 if (rtc_include_tests) {
mbonadei148d5a22017-04-28 05:24:50 -070030 deps += [
31 ":test_main",
32 ":test_support_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +020033 "scenario/scenario_tests",
mbonadei148d5a22017-04-28 05:24:50 -070034 ]
35 }
kjellander0f380d82016-06-01 04:48:26 -070036}
37
ehmaldonado38a21322016-09-02 04:10:34 -070038rtc_source_set("video_test_common") {
Per Kjellandera7f2d842018-01-10 15:54:53 +000039 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -070040 testonly = true
41 sources = [
42 "fake_texture_frame.cc",
43 "fake_texture_frame.h",
44 "frame_generator.cc",
45 "frame_generator.h",
ehmaldonado656610f2017-02-06 02:21:11 -080046 "frame_generator_capturer.cc",
47 "frame_generator_capturer.h",
kjellander0f380d82016-06-01 04:48:26 -070048 "frame_utils.cc",
49 "frame_utils.h",
Sebastian Janssonf1f363f2018-08-13 14:24:58 +020050 "test_video_capturer.cc",
51 "test_video_capturer.h",
mflodman351424e2017-08-10 02:43:14 -070052 "video_codec_settings.h",
kjellander0f380d82016-06-01 04:48:26 -070053 ]
54
kjellander0f380d82016-06-01 04:48:26 -070055 deps = [
mbonadei3edccb92017-06-01 04:47:20 -070056 "..:webrtc_common",
Patrik Höglund9e194032018-01-04 15:58:20 +010057 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +010058 "../api:scoped_refptr",
Sebastian Janssonfb14c5d2019-02-28 13:30:04 +010059 "../api/task_queue",
60 "../api/task_queue:global_task_queue_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020061 "../api/video:video_frame",
Emircan Uysaler0823eec2018-07-13 17:10:00 -070062 "../api/video:video_frame_i010",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020063 "../api/video:video_frame_i420",
mflodman351424e2017-08-10 02:43:14 -070064 "../api/video_codecs:video_codecs_api",
aleloi440b6d92017-08-22 05:43:23 -070065 "../call:video_stream_api",
kjellander0f380d82016-06-01 04:48:26 -070066 "../common_video",
sprangc5d62e22017-04-02 23:53:04 -070067 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010068 "../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +010069 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -070070 "../rtc_base:rtc_task_queue",
Sebastian Janssonecb68972019-01-18 10:30:54 +010071 "../rtc_base/task_utils:repeating_task",
mbonadei3edccb92017-06-01 04:47:20 -070072 "../system_wrappers",
Danil Chapovalovabd42732018-09-10 14:07:45 +020073 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov431abd92018-06-18 12:54:17 +020074 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -070075 ]
76}
77
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +010078if (!build_with_chromium) {
79 if (is_mac || is_ios) {
80 rtc_source_set("video_test_mac") {
81 testonly = true
82 sources = [
83 "mac_capturer.h",
84 "mac_capturer.mm",
85 ]
86 deps = [
87 ":video_test_common",
88 "../api:libjingle_peerconnection_api",
89 "../api:scoped_refptr",
90 "../modules/video_capture:video_capture_module",
91 "../rtc_base:rtc_base",
92 "../sdk:base_objc",
93 "../sdk:native_api",
94 "../sdk:native_video",
95 "../sdk:videocapture_objc",
96 ]
97 }
98 }
99
100 rtc_source_set("platform_video_capturer") {
101 testonly = true
102 sources = [
103 "platform_video_capturer.cc",
104 "platform_video_capturer.h",
105 ]
106 deps = [
107 ":video_test_common",
108 "//third_party/abseil-cpp/absl/memory",
109 ]
110 if (is_mac || is_ios) {
111 deps += [ ":video_test_mac" ]
112 } else {
113 sources += [
114 "vcm_capturer.cc",
115 "vcm_capturer.h",
116 ]
117 deps += [
118 "../api:scoped_refptr",
119 "../modules/video_capture:video_capture_module",
120 "../rtc_base:checks",
121 "../rtc_base:logging",
122 ]
123 }
124 }
125}
126
ehmaldonado38a21322016-09-02 04:10:34 -0700127rtc_source_set("rtp_test_utils") {
kjellander0f380d82016-06-01 04:48:26 -0700128 testonly = true
129 sources = [
130 "rtcp_packet_parser.cc",
131 "rtcp_packet_parser.h",
132 "rtp_file_reader.cc",
133 "rtp_file_reader.h",
134 "rtp_file_writer.cc",
135 "rtp_file_writer.h",
136 ]
137
kjellander0f380d82016-06-01 04:48:26 -0700138 deps = [
139 "..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700140 "../api:array_view",
kjellander0f380d82016-06-01 04:48:26 -0700141 "../modules/rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100142 "../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100143 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700144 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200145 "../rtc_base/system:arch",
kjellander0f380d82016-06-01 04:48:26 -0700146 "//testing/gtest",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000147 ]
148}
149
ehmaldonado38a21322016-09-02 04:10:34 -0700150rtc_source_set("field_trial") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000151 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -0700152 testonly = true
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000153 sources = [
154 "field_trial.cc",
155 "field_trial.h",
156 ]
157
158 deps = [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000159 "..:webrtc_common",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200160 "../system_wrappers:field_trial",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000161 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000162}
163
Edward Lemure66572b2018-01-05 15:34:09 +0100164rtc_source_set("perf_test") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000165 visibility = [ "*" ]
Edward Lemure66572b2018-01-05 15:34:09 +0100166 sources = [
167 "testsupport/perf_test.cc",
168 "testsupport/perf_test.h",
169 ]
170 deps = [
171 "..:webrtc_common",
172 "../api:array_view",
Oleh Prypind136b282018-10-03 13:53:44 +0200173 "../rtc_base:checks",
Edward Lemure66572b2018-01-05 15:34:09 +0100174 "../rtc_base:rtc_base_approved",
175 ]
176}
177
mbonadeicd95a4e2017-08-23 23:55:54 -0700178if (is_ios) {
179 rtc_source_set("test_support_objc") {
180 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700181 visibility = [ ":test_support" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700182 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +0100183 "ios/coverage_util_ios.h",
184 "ios/coverage_util_ios.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700185 "ios/test_support.h",
186 "ios/test_support.mm",
187 ]
denicijad207a392017-09-11 06:43:28 -0700188 deps = [
Edward Lemure66572b2018-01-05 15:34:09 +0100189 ":perf_test",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200190 "../sdk:helpers_objc",
denicijad207a392017-09-11 06:43:28 -0700191 ]
Artem Titarenko34fc3462018-11-06 12:29:29 +0100192 configs += [ ":test_support_objc_config" ]
193 }
194
195 config("test_support_objc_config") {
196 defines = []
197
198 if (use_clang_coverage) {
199 defines += [ "WEBRTC_IOS_ENABLE_COVERAGE" ]
200 }
mbonadeicd95a4e2017-08-23 23:55:54 -0700201 }
202}
203
Patrik Höglund34924c22018-01-19 09:11:07 +0100204config("suppress_warning_4373") {
205 if (is_win) {
206 cflags = [
207 # MSVC has a bug which generates this warning when using mocks; see the
208 # section on warning 4373 in he googlemock FAQ. This warning isn't the
209 # least relevant for us, anyway.
210 "/wd4373",
211 ]
212 }
213}
214
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200215config("test_main_direct_config") {
216 visibility = [ ":*" ]
217 defines = [ "UNIT_TEST" ]
218}
mbonadei148d5a22017-04-28 05:24:50 -0700219rtc_source_set("test_support") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000220 visibility = [ "*" ]
mbonadei148d5a22017-04-28 05:24:50 -0700221 testonly = true
kjellander32c4a202016-08-30 02:53:49 -0700222
Mirko Bonadei65ce3112018-01-26 11:57:47 +0100223 all_dependent_configs = [
224 ":suppress_warning_4373",
225 "//third_party/googletest:gmock_config",
226 "//third_party/googletest:gtest_config",
227 ]
Patrik Höglund34924c22018-01-19 09:11:07 +0100228
mbonadei148d5a22017-04-28 05:24:50 -0700229 sources = [
230 "gmock.h",
231 "gtest.h",
mbonadei148d5a22017-04-28 05:24:50 -0700232 ]
233
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100234 public_deps = [] # no-presubmit-check TODO(webrtc:8603)
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200235 if (is_ios) {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100236 public_deps += [ ":test_support_objc" ] # no-presubmit-check TODO(webrtc:8603)
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200237 }
238
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200239 public_configs = [ ":test_main_direct_config" ]
mbonadei148d5a22017-04-28 05:24:50 -0700240 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700241 "../rtc_base:rtc_base_approved",
mbonadei148d5a22017-04-28 05:24:50 -0700242 "//testing/gmock",
243 "//testing/gtest",
244 ]
kjellander32c4a202016-08-30 02:53:49 -0700245}
246
oprypinfbbba3f2017-09-25 08:34:41 -0700247if (rtc_include_tests) {
Artem Titov40a7a352018-10-15 15:25:34 +0200248 rtc_source_set("test_main_lib") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000249 visibility = [ "*" ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200250 testonly = true
Oleh Prypin5ab68542017-09-25 09:18:00 +0000251 sources = [
Artem Titov40a7a352018-10-15 15:25:34 +0200252 "test_main_lib.cc",
253 "test_main_lib.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000254 ]
255
Oleh Prypin5ab68542017-09-25 09:18:00 +0000256 deps = [
257 ":field_trial",
Edward Lemure66572b2018-01-05 15:34:09 +0100258 ":perf_test",
Artem Titov40a7a352018-10-15 15:25:34 +0200259 ":test_support",
Yves Gerey3e707812018-11-28 16:47:49 +0100260 "../rtc_base:checks",
Niels Möller8909a632018-09-06 08:42:44 +0200261 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200262 "../system_wrappers:field_trial",
263 "../system_wrappers:metrics",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000264 "//testing/gtest",
Yves Gerey3e707812018-11-28 16:47:49 +0100265 "//third_party/abseil-cpp/absl/memory",
Patrik Höglund77301932018-10-09 15:09:51 +0200266
267 # TODO(bugs.webrtc.org/9792): This is needed for downstream projects on
268 # Android, where it's replaced by an internal version of fileutils that
269 # has a certain flag. Remove this once the internal fileutils has been
270 # eliminated.
271 "../test:fileutils",
mbonadei9452c622017-04-27 12:29:29 -0700272 ]
273 }
mbonadei9452c622017-04-27 12:29:29 -0700274
Artem Titov40a7a352018-10-15 15:25:34 +0200275 rtc_source_set("test_main") {
276 visibility = [ "*" ]
277 testonly = true
278 sources = [
279 "test_main.cc",
280 ]
281
282 deps = [
283 ":test_main_lib",
284 ]
285 }
286
Oleh Prypin5ab68542017-09-25 09:18:00 +0000287 rtc_source_set("video_test_support") {
288 testonly = true
289
290 sources = [
291 "testsupport/frame_reader.h",
292 "testsupport/frame_writer.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000293 "testsupport/mock/mock_frame_reader.h",
Artem Titov08a9b612019-01-17 21:37:19 +0100294 "testsupport/video_frame_writer.cc",
295 "testsupport/video_frame_writer.h",
Artem Titov645df9e2019-01-14 14:21:59 +0100296 "testsupport/y4m_frame_reader.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000297 "testsupport/y4m_frame_writer.cc",
298 "testsupport/yuv_frame_reader.cc",
299 "testsupport/yuv_frame_writer.cc",
300 ]
301
302 deps = [
Patrik Höglund7696bef2018-03-15 15:05:39 +0100303 ":fileutils",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000304 ":test_support",
305 ":video_test_common",
306 "..:webrtc_common",
Artem Titov08a9b612019-01-17 21:37:19 +0100307 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200308 "../api/video:video_frame",
309 "../api/video:video_frame_i420",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000310 "../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100311 "../rtc_base:checks",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000312 "../rtc_base:rtc_base_approved",
313 "../system_wrappers",
Artem Titov08a9b612019-01-17 21:37:19 +0100314 "//third_party/abseil-cpp/absl/memory:memory",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100315 "//third_party/libyuv",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000316 ]
317
318 if (!is_ios) {
319 deps += [ "//third_party:jpeg" ]
320 sources += [ "testsupport/jpeg_frame_writer.cc" ]
321 } else {
322 sources += [ "testsupport/jpeg_frame_writer_ios.cc" ]
323 }
324
Oleh Prypin5ab68542017-09-25 09:18:00 +0000325 if (is_android) {
326 deps += [ "//base:base" ]
327 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000328 }
329
Edward Lemuraf8659a2017-09-27 14:46:24 +0200330 rtc_source_set("test_support_test_artifacts") {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000331 testonly = true
332 sources = [
Edward Lemuraf8659a2017-09-27 14:46:24 +0200333 "testsupport/test_artifacts.cc",
334 "testsupport/test_artifacts.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000335 ]
336 deps = [
337 ":fileutils",
338 "../rtc_base:rtc_base_approved",
Niels Möllerb7edf692019-02-08 16:40:53 +0100339 "../rtc_base/system:file_wrapper",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000340 ]
341 }
342
343 test_support_unittests_resources = [
344 "../resources/foreman_cif_short.yuv",
345 "../resources/video_coding/frame-ethernet-ii.pcap",
346 "../resources/video_coding/frame-loopback.pcap",
347 "../resources/video_coding/pltype103.rtp",
348 "../resources/video_coding/pltype103_header_only.rtp",
349 "../resources/video_coding/ssrcs-2.pcap",
350 "../resources/video_coding/ssrcs-3.pcap",
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200351 ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200352
353 if (is_ios) {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000354 bundle_data("test_support_unittests_bundle_data") {
355 testonly = true
356 sources = test_support_unittests_resources
357 outputs = [
358 "{{bundle_resources_dir}}/{{source_file_part}}",
359 ]
360 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200361 }
362
Oleh Prypin5ab68542017-09-25 09:18:00 +0000363 rtc_test("test_support_unittests") {
364 deps = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800365 ":call_config_utils",
Artem Titov66a29b92019-01-15 14:43:20 +0100366 ":copy_to_file_audio_capturer_unittest",
Sebastian Jansson09408112018-04-24 14:41:22 +0200367 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200368 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100369 ":fileutils",
Mirko Bonadei46399992018-08-22 15:32:38 +0200370 ":fileutils_unittests",
Edward Lemure66572b2018-01-05 15:34:09 +0100371 ":perf_test",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000372 ":rtp_test_utils",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200373 ":test_common",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200374 ":test_main",
375 ":test_support",
376 ":test_support_test_artifacts",
377 ":video_test_common",
378 ":video_test_support",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200379 "../api:create_simulcast_test_fixture_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100380 "../api:scoped_refptr",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200381 "../api:simulcast_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200382 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800383 "../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100384 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200385 "../api/video:video_frame_i420",
Benjamin Wright9db8b882019-01-14 15:30:20 -0800386 "../call:video_stream_api",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200387 "../modules/rtp_rtcp:rtp_rtcp",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200388 "../modules/video_capture",
389 "../modules/video_coding:simulcast_test_fixture_impl",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000390 "../rtc_base:rtc_base_approved",
Niels Möllerb7edf692019-02-08 16:40:53 +0100391 "../rtc_base/system:file_wrapper",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200392 "../test:single_threaded_task_queue",
Artem Titov4895b452019-01-14 16:54:04 +0100393 "pc/e2e:e2e_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +0200394 "scenario:scenario_unittests",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200395 "//testing/gmock",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200396 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200397 "//third_party/abseil-cpp/absl/memory",
Artem Titov645df9e2019-01-14 14:21:59 +0100398 "//third_party/abseil-cpp/absl/strings",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000399 ]
400 sources = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800401 "call_config_utils_unittest.cc",
Sebastian Jansson09408112018-04-24 14:41:22 +0200402 "direct_transport_unittest.cc",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200403 "fake_vp8_encoder_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000404 "frame_generator_unittest.cc",
405 "rtp_file_reader_unittest.cc",
406 "rtp_file_writer_unittest.cc",
407 "single_threaded_task_queue_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000408 "testsupport/perf_test_unittest.cc",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200409 "testsupport/test_artifacts_unittest.cc",
Artem Titov08a9b612019-01-17 21:37:19 +0100410 "testsupport/video_frame_writer_unittest.cc",
Artem Titov645df9e2019-01-14 14:21:59 +0100411 "testsupport/y4m_frame_reader_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000412 "testsupport/y4m_frame_writer_unittest.cc",
413 "testsupport/yuv_frame_reader_unittest.cc",
414 "testsupport/yuv_frame_writer_unittest.cc",
415 ]
416
Oleh Prypin5ab68542017-09-25 09:18:00 +0000417 data = test_support_unittests_resources
418 if (is_android) {
419 deps += [ "//testing/android/native_test:native_test_support" ]
420 shard_timeout = 900
421 }
422
423 if (is_ios) {
424 deps += [ ":test_support_unittests_bundle_data" ]
425 }
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200426
Mirko Bonadei9098b302018-04-06 10:48:10 +0200427 if (!is_android && !build_with_chromium) {
428 # This is needed in order to avoid:
429 # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create
430 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
431 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000432 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200433}
434
mbonadeicd95a4e2017-08-23 23:55:54 -0700435if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200436 rtc_source_set("fileutils_ios_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200437 visibility = [
438 ":fileutils",
439 ":fileutils_override_impl",
440 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700441 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800442 "testsupport/ios_file_utils.h",
443 "testsupport/ios_file_utils.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700444 ]
445 deps = [
446 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100447 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700448 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200449 "../sdk:helpers_objc",
mbonadeicd95a4e2017-08-23 23:55:54 -0700450 ]
451 }
452}
453
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200454if (is_mac) {
455 rtc_source_set("fileutils_mac_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200456 visibility = [
457 ":fileutils",
458 ":fileutils_override_impl",
459 ]
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200460 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800461 "testsupport/mac_file_utils.h",
462 "testsupport/mac_file_utils.mm",
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200463 ]
464 deps = [
465 "../rtc_base:checks",
466 ]
467 }
468}
469
mbonadei9452c622017-04-27 12:29:29 -0700470rtc_source_set("fileutils") {
471 testonly = true
Patrik Höglund7696bef2018-03-15 15:05:39 +0100472 visibility = [ "*" ]
mbonadei9452c622017-04-27 12:29:29 -0700473 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800474 "testsupport/file_utils.cc",
475 "testsupport/file_utils.h",
mbonadei9452c622017-04-27 12:29:29 -0700476 ]
mbonadei3edccb92017-06-01 04:47:20 -0700477 deps = [
Artem Titov8f726be2018-10-23 15:50:10 +0200478 ":fileutils_override_api",
479 ":fileutils_override_impl",
480 "..:webrtc_common",
481 "../rtc_base:checks",
482 "../rtc_base:rtc_base_approved",
483 "../rtc_base/system:arch",
484 "//third_party/abseil-cpp/absl/types:optional",
485 ]
486 if (is_ios) {
487 deps += [ ":fileutils_ios_objc" ]
488 }
489 if (is_mac) {
490 deps += [ ":fileutils_mac_objc" ]
491 }
492 if (is_win) {
493 deps += [ "../rtc_base:rtc_base" ]
494 }
495}
496
497# We separate header into own target to make it possible for downstream
498# projects to override implementation.
499rtc_source_set("fileutils_override_api") {
500 testonly = true
501 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800502 "testsupport/file_utils_override.h",
Artem Titov8f726be2018-10-23 15:50:10 +0200503 ]
504}
505
506rtc_source_set("fileutils_override_impl") {
507 testonly = true
508 visibility = [ ":fileutils" ]
509 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800510 "testsupport/file_utils_override.cc",
Artem Titov8f726be2018-10-23 15:50:10 +0200511 ]
512 deps = [
513 ":fileutils_override_api",
mbonadei3edccb92017-06-01 04:47:20 -0700514 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100515 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700516 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200517 "../rtc_base/system:arch",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200518 "//third_party/abseil-cpp/absl/types:optional",
mbonadei3edccb92017-06-01 04:47:20 -0700519 ]
mbonadei9452c622017-04-27 12:29:29 -0700520 if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200521 deps += [ ":fileutils_ios_objc" ]
522 }
523 if (is_mac) {
524 deps += [ ":fileutils_mac_objc" ]
mbonadei3edccb92017-06-01 04:47:20 -0700525 }
526 if (is_win) {
ehmaldonadof6a861a2017-07-19 10:40:47 -0700527 deps += [ "../rtc_base:rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700528 }
mbonadei9452c622017-04-27 12:29:29 -0700529}
530
531rtc_source_set("run_test") {
532 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700533 if (is_mac) {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100534 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
mbonadeicd95a4e2017-08-23 23:55:54 -0700535 ":run_test_objc",
536 ]
537 } else {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100538 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
mbonadeicd95a4e2017-08-23 23:55:54 -0700539 ":run_test_generic",
540 ]
541 }
542}
543
544rtc_source_set("run_test_interface") {
mbonadei9452c622017-04-27 12:29:29 -0700545 sources = [
546 "run_test.h",
547 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700548}
549
550if (is_mac) {
551 rtc_source_set("run_test_objc") {
552 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700553 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700554 sources = [
555 "mac/run_test.mm",
556 ]
mbonadei9c296b32017-09-05 05:11:41 -0700557 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700558 ":run_test_interface",
559 ]
mbonadei9452c622017-04-27 12:29:29 -0700560 }
561}
562
mbonadeicd95a4e2017-08-23 23:55:54 -0700563rtc_source_set("run_test_generic") {
564 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700565 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700566 sources = [
567 "run_test.cc",
568 ]
mbonadei9c296b32017-09-05 05:11:41 -0700569 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700570 ":run_test_interface",
571 ]
572}
573
ehmaldonado37535bf2016-12-05 06:42:45 -0800574rtc_source_set("fileutils_unittests") {
575 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700576 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800577 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800578 "testsupport/file_utils_unittest.cc",
ehmaldonado37535bf2016-12-05 06:42:45 -0800579 ]
580 deps = [
581 ":fileutils",
mbonadei3edccb92017-06-01 04:47:20 -0700582 ":test_support",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100583 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700584 "../rtc_base:rtc_base_approved",
ehmaldonado37535bf2016-12-05 06:42:45 -0800585 "//testing/gtest",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200586 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado37535bf2016-12-05 06:42:45 -0800587 ]
588}
kjellander0f380d82016-06-01 04:48:26 -0700589
perkj488c5dc2017-02-08 05:55:51 -0800590rtc_source_set("direct_transport") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000591 visibility = [ "*" ]
perkj488c5dc2017-02-08 05:55:51 -0800592 testonly = true
593 sources = [
594 "direct_transport.cc",
595 "direct_transport.h",
perkj488c5dc2017-02-08 05:55:51 -0800596 ]
perkj488c5dc2017-02-08 05:55:51 -0800597 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700598 "..:webrtc_common",
Artem Titov46c4e602018-08-17 14:26:54 +0200599 "../api:simulated_network_api",
perkj488c5dc2017-02-08 05:55:51 -0800600 "../api:transport_api",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100601 "../call:call_interfaces",
Artem Titov46c4e602018-08-17 14:26:54 +0200602 "../call:simulated_packet_receiver",
mbonadei3edccb92017-06-01 04:47:20 -0700603 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700604 "../rtc_base:rtc_base_approved",
eladalon413ee9a2017-08-22 04:02:52 -0700605 "../rtc_base:sequenced_task_checker",
mbonadei3edccb92017-06-01 04:47:20 -0700606 "../system_wrappers",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200607 "//third_party/abseil-cpp/absl/memory",
perkj488c5dc2017-02-08 05:55:51 -0800608 ]
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100609 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
eladalon413ee9a2017-08-22 04:02:52 -0700610 ":single_threaded_task_queue",
Erik Språng09708512018-03-14 15:16:50 +0100611 "../call:fake_network",
eladalon413ee9a2017-08-22 04:02:52 -0700612 ]
613}
614
615rtc_source_set("single_threaded_task_queue") {
616 testonly = true
617 sources = [
618 "single_threaded_task_queue.cc",
619 "single_threaded_task_queue.h",
620 ]
621 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100622 "../rtc_base:checks",
eladalon413ee9a2017-08-22 04:02:52 -0700623 "../rtc_base:rtc_base_approved",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200624 "//third_party/abseil-cpp/absl/memory",
eladalon413ee9a2017-08-22 04:02:52 -0700625 ]
perkj488c5dc2017-02-08 05:55:51 -0800626}
627
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200628rtc_source_set("fake_video_codecs") {
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -0500629 allow_poison = [ "software_video_codecs" ]
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200630 visibility = [ "*" ]
631 sources = [
632 "configurable_frame_size_encoder.cc",
633 "configurable_frame_size_encoder.h",
634 "fake_decoder.cc",
635 "fake_decoder.h",
636 "fake_encoder.cc",
637 "fake_encoder.h",
Per Kjellander841c9122018-10-04 18:40:28 +0200638 "fake_vp8_decoder.cc",
639 "fake_vp8_decoder.h",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200640 "fake_vp8_encoder.cc",
641 "fake_vp8_encoder.h",
642 ]
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200643 deps = [
644 "..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100645 "../api:scoped_refptr",
Niels Möller4dc66c52018-10-05 14:17:58 +0200646 "../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +0100647 "../api/video:video_bitrate_allocation",
648 "../api/video:video_frame",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200649 "../api/video:video_frame_i420",
Erik Språng4529fbc2018-10-12 10:30:31 +0200650 "../api/video_codecs:create_vp8_temporal_layers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200651 "../api/video_codecs:video_codecs_api",
652 "../common_video:common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100653 "../modules:module_api",
654 "../modules/video_coding:codec_globals_headers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200655 "../modules/video_coding:video_codec_interface",
656 "../modules/video_coding:video_coding_utility",
657 "../modules/video_coding:webrtc_h264",
658 "../modules/video_coding:webrtc_vp8",
659 "../modules/video_coding:webrtc_vp9",
660 "../rtc_base:checks",
661 "../rtc_base:rtc_base_approved",
662 "../rtc_base:rtc_task_queue",
663 "../rtc_base:sequenced_task_checker",
664 "../system_wrappers",
Niels Möllerd7380712019-03-06 10:09:47 +0100665 "//third_party/abseil-cpp/absl/memory",
Yves Gerey3e707812018-11-28 16:47:49 +0100666 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200667 ]
668}
669
ehmaldonado38a21322016-09-02 04:10:34 -0700670rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700671 testonly = true
672 sources = [
673 "call_test.cc",
674 "call_test.h",
kjellander0f380d82016-06-01 04:48:26 -0700675 "drifting_clock.cc",
676 "drifting_clock.h",
677 "encoder_settings.cc",
678 "encoder_settings.h",
sakal55d932b2016-09-30 06:19:08 -0700679 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700680 "layer_filtering_transport.cc",
681 "layer_filtering_transport.h",
Danil Chapovalovdd7e2842018-03-09 15:37:03 +0000682 "mock_transport.cc",
kjellander0f380d82016-06-01 04:48:26 -0700683 "mock_transport.h",
kjellander0f380d82016-06-01 04:48:26 -0700684 "null_transport.cc",
685 "null_transport.h",
686 "rtp_rtcp_observer.h",
687 "statistics.cc",
688 "statistics.h",
Niels Möllercbcbc222018-09-28 09:07:24 +0200689 "video_decoder_proxy_factory.h",
690 "video_encoder_proxy_factory.h",
kjellander0f380d82016-06-01 04:48:26 -0700691 ]
Robin Raymondce1b1402018-11-22 20:10:11 -0500692 if (current_os != "winuwp") {
693 # The filtering of *_win.cc is not done for WinUWP (intentionally) as
694 # most _win.cc files are compatible with WinUWP. However, the
695 # peek/dispatch Win32 runloops are entirely WinUWP incompatible thus
696 # WinUWP uses the generic runloop as defined for non-Windows targets.
697 sources += [ "win/run_loop_win.cc" ]
698 }
699 if (!is_win || current_os == "winuwp") {
kjellander0f380d82016-06-01 04:48:26 -0700700 sources += [
701 "run_loop.cc",
702 "run_loop.h",
703 ]
704 }
705
kjellander0f380d82016-06-01 04:48:26 -0700706 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800707 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200708 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100709 ":fileutils",
kjellander0f380d82016-06-01 04:48:26 -0700710 ":rtp_test_utils",
711 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800712 ":video_test_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100713 "../:webrtc_common",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100714 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100715 "../api:scoped_refptr",
Artem Titov46c4e602018-08-17 14:26:54 +0200716 "../api:simulated_network_api",
mbonadei3edccb92017-06-01 04:47:20 -0700717 "../api:transport_api",
mbonadei3edccb92017-06-01 04:47:20 -0700718 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700719 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalovddc84e92018-10-24 17:01:58 +0200720 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800721 "../api/video:builtin_video_bitrate_allocator_factory",
722 "../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200723 "../api/video:video_frame",
ilnikd60d06a2017-04-05 03:02:20 -0700724 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700725 "../audio",
kjellander94cee312016-06-10 01:56:57 -0700726 "../call",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100727 "../call:call_interfaces",
Artem Titov4e199e92018-08-20 13:30:39 +0200728 "../call:fake_network",
Yves Gerey3e707812018-11-28 16:47:49 +0100729 "../call:rtp_interfaces",
sprangdb2a9fc2017-08-09 06:42:32 -0700730 "../call:rtp_sender",
Artem Titov4e199e92018-08-20 13:30:39 +0200731 "../call:simulated_network",
Artem Titov46c4e602018-08-17 14:26:54 +0200732 "../call:simulated_packet_receiver",
aleloi440b6d92017-08-22 05:43:23 -0700733 "../call:video_stream_api",
mbonadei3edccb92017-06-01 04:47:20 -0700734 "../logging:rtc_event_log_api",
Qingsi Wang970b0882018-02-01 11:04:46 -0800735 "../logging:rtc_event_log_impl_base",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800736 "../media:rtc_internal_video_codecs",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100737 "../media:rtc_media_base",
Artem Titov3faa8322018-03-07 14:44:00 +0100738 "../modules/audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100739 "../modules/audio_device:audio_device_impl",
mbonadei3edccb92017-06-01 04:47:20 -0700740 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800741 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800742 "../modules/audio_processing",
mbonadei3edccb92017-06-01 04:47:20 -0700743 "../modules/rtp_rtcp",
744 "../modules/rtp_rtcp:mock_rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100745 "../modules/rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100746 "../modules/rtp_rtcp:rtp_video_header",
747 "../modules/video_coding:codec_globals_headers",
charujaincb728ea2017-09-18 03:08:08 -0700748 "../modules/video_coding:video_coding_utility",
mbonadei3edccb92017-06-01 04:47:20 -0700749 "../modules/video_coding:webrtc_h264",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800750 "../modules/video_coding:webrtc_multiplex",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200751 "../modules/video_coding:webrtc_vp8",
mbonadei3edccb92017-06-01 04:47:20 -0700752 "../modules/video_coding:webrtc_vp9",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100753 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700754 "../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -0700755 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200756 "../system_wrappers:field_trial",
kjellander94cee312016-06-10 01:56:57 -0700757 "../video",
kjellander0f380d82016-06-01 04:48:26 -0700758 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200759 "//third_party/abseil-cpp/absl/memory",
Elad Alond8d32482019-02-18 23:45:57 +0100760 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -0700761 ]
mbonadei148d5a22017-04-28 05:24:50 -0700762 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700763 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
764 }
kjellander0f380d82016-06-01 04:48:26 -0700765}
766
ehmaldonado38a21322016-09-02 04:10:34 -0700767rtc_source_set("test_renderer") {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100768 public_deps = [ # no-presubmit-check TODO(webrtc:8603)
mbonadei9c296b32017-09-05 05:11:41 -0700769 ":test_renderer_generic",
770 ]
kjellander0f380d82016-06-01 04:48:26 -0700771 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700772 if (is_mac) {
Kári Tristan Helgasonede7cb22019-03-06 10:34:09 +0100773 public_deps += [ ":test_renderer_objc" ] # no-presubmit-check TODO(webrtc:8603)
mbonadeicd95a4e2017-08-23 23:55:54 -0700774 }
775}
776
777if (is_mac) {
778 rtc_source_set("test_renderer_objc") {
779 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700780 visibility = [ ":test_renderer" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700781 sources = [
782 "mac/video_renderer_mac.h",
783 "mac/video_renderer_mac.mm",
784 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700785 deps = [
mbonadei9c296b32017-09-05 05:11:41 -0700786 ":test_renderer_generic",
mbonadeicd95a4e2017-08-23 23:55:54 -0700787 "../rtc_base:rtc_base_approved",
788 ]
789 libs = [
790 "Cocoa.framework",
791 "OpenGL.framework",
792 "CoreVideo.framework",
793 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700794 }
795}
796
797rtc_source_set("test_renderer_generic") {
798 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700799 visibility = [
800 ":test_renderer",
801 ":test_renderer_objc",
802 ]
kjellander0f380d82016-06-01 04:48:26 -0700803 libs = []
804 sources = [
kjellander0f380d82016-06-01 04:48:26 -0700805 "video_renderer.cc",
806 "video_renderer.h",
807 "win/d3d_renderer.cc",
808 "win/d3d_renderer.h",
809 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700810 deps = [
811 ":test_support",
812 "..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100813 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200814 "../api/video:video_frame",
mbonadeicd95a4e2017-08-23 23:55:54 -0700815 "../common_video",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100816 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100817 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700818 "../rtc_base:rtc_base_approved",
819 "//testing/gtest",
820 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100821 if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) {
kjellander0f380d82016-06-01 04:48:26 -0700822 sources += [ "null_platform_renderer.cc" ]
823 }
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100824 if ((is_linux && rtc_use_x11) || is_mac) {
kjellander0f380d82016-06-01 04:48:26 -0700825 sources += [
826 "gl/gl_renderer.cc",
827 "gl/gl_renderer.h",
828 ]
829 }
830
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100831 if (is_linux && rtc_use_x11) {
Edward Lemur84a87c42017-11-07 19:07:31 +0100832 sources += [
833 "linux/glx_renderer.cc",
834 "linux/glx_renderer.h",
835 "linux/video_renderer_linux.cc",
836 ]
kjellander0f380d82016-06-01 04:48:26 -0700837 libs += [
838 "Xext",
839 "X11",
840 "GL",
841 ]
842 }
843 if (is_android) {
844 libs += [
845 "GLESv2",
846 "log",
847 ]
848 }
kjellander0f380d82016-06-01 04:48:26 -0700849}
kwiberg37e99fd2017-04-10 05:15:48 -0700850
851rtc_source_set("audio_codec_mocks") {
852 testonly = true
853 sources = [
Niels Möller3f651d82018-12-19 15:06:17 +0100854 # TODO(nisse): Move these factories to their own target, to avoid
855 # unnecessary dependencies on gmock and gtest.
Niels Möllerb7180c02018-12-06 13:07:11 +0100856 "audio_decoder_proxy_factory.h",
Niels Möllera0f44302018-11-30 10:45:12 +0100857 "function_audio_decoder_factory.h",
kwiberg2b3aa142017-06-14 03:31:17 -0700858 "mock_audio_decoder.cc",
kwiberg37e99fd2017-04-10 05:15:48 -0700859 "mock_audio_decoder.h",
860 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700861 "mock_audio_encoder.cc",
862 "mock_audio_encoder.h",
863 "mock_audio_encoder_factory.h",
864 ]
865
866 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700867 ":test_support",
kwiberg529662a2017-09-04 05:43:17 -0700868 "../api:array_view",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100869 "../api:scoped_refptr",
ossueb1fde42017-05-02 06:46:30 -0700870 "../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -0700871 "../api/audio_codecs:builtin_audio_decoder_factory",
Niels Möllera0f44302018-11-30 10:45:12 +0100872 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700873 "../rtc_base:rtc_base_approved",
Niels Möllera0f44302018-11-30 10:45:12 +0100874 "//third_party/abseil-cpp/absl/memory",
kwiberg37e99fd2017-04-10 05:15:48 -0700875 ]
876}
sakald7fdb802017-05-26 01:51:53 -0700877
Artem Titov66a29b92019-01-15 14:43:20 +0100878rtc_source_set("copy_to_file_audio_capturer") {
879 testonly = true
880 sources = [
881 "testsupport/copy_to_file_audio_capturer.cc",
882 "testsupport/copy_to_file_audio_capturer.h",
883 ]
884 deps = [
885 "../api:array_view",
886 "../common_audio:common_audio",
887 "../modules/audio_device:audio_device_impl",
888 "../rtc_base:rtc_base_approved",
889 "//third_party/abseil-cpp/absl/memory",
890 "//third_party/abseil-cpp/absl/types:optional",
891 ]
892}
893
894rtc_source_set("copy_to_file_audio_capturer_unittest") {
895 testonly = true
896 sources = [
897 "testsupport/copy_to_file_audio_capturer_unittest.cc",
898 ]
899 deps = [
900 ":copy_to_file_audio_capturer",
901 ":fileutils",
902 ":test_support",
903 "../modules/audio_device:audio_device_impl",
904 "//third_party/abseil-cpp/absl/memory",
905 ]
906}
907
sakald7fdb802017-05-26 01:51:53 -0700908if (!build_with_chromium && is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000909 rtc_android_library("native_test_java") {
sakald7fdb802017-05-26 01:51:53 -0700910 testonly = true
911 java_files = [
912 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
913 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
914 ]
915 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700916 "../rtc_base:base_java",
sakald7fdb802017-05-26 01:51:53 -0700917 "//testing/android/native_test:native_test_java",
sakald7fdb802017-05-26 01:51:53 -0700918 ]
919 }
920}
Benjamin Wright8efafdf2019-01-11 10:48:42 -0800921
922rtc_source_set("call_config_utils") {
923 sources = [
924 "call_config_utils.cc",
925 "call_config_utils.h",
926 ]
927 deps = [
928 "../call:call_interfaces",
929 "../call:video_stream_api",
930 "../rtc_base:rtc_json",
931 ]
932}