blob: 254b16578115225195b00594f3269e46ebeb7270 [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",
Ilya Nikolaevskiy5054f542019-01-31 14:35:11 +010044 "frame_change_extractor.cc",
45 "frame_change_extractor.h",
kjellander0f380d82016-06-01 04:48:26 -070046 "frame_generator.cc",
47 "frame_generator.h",
ehmaldonado656610f2017-02-06 02:21:11 -080048 "frame_generator_capturer.cc",
49 "frame_generator_capturer.h",
kjellander0f380d82016-06-01 04:48:26 -070050 "frame_utils.cc",
51 "frame_utils.h",
Sebastian Janssonf1f363f2018-08-13 14:24:58 +020052 "test_video_capturer.cc",
53 "test_video_capturer.h",
ehmaldonado656610f2017-02-06 02:21:11 -080054 "vcm_capturer.cc",
55 "vcm_capturer.h",
mflodman351424e2017-08-10 02:43:14 -070056 "video_codec_settings.h",
kjellander0f380d82016-06-01 04:48:26 -070057 ]
58
kjellandere40a7ee2016-10-16 23:56:12 -070059 if (!build_with_chromium && is_clang) {
60 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070061 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070062 }
63
64 deps = [
mbonadei3edccb92017-06-01 04:47:20 -070065 "..:webrtc_common",
Patrik Höglund9e194032018-01-04 15:58:20 +010066 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +010067 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020068 "../api/video:video_frame",
Emircan Uysaler0823eec2018-07-13 17:10:00 -070069 "../api/video:video_frame_i010",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020070 "../api/video:video_frame_i420",
mflodman351424e2017-08-10 02:43:14 -070071 "../api/video_codecs:video_codecs_api",
aleloi440b6d92017-08-22 05:43:23 -070072 "../call:video_stream_api",
kjellander0f380d82016-06-01 04:48:26 -070073 "../common_video",
sprangc5d62e22017-04-02 23:53:04 -070074 "../media:rtc_media_base",
ehmaldonado656610f2017-02-06 02:21:11 -080075 "../modules/video_capture:video_capture_module",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010076 "../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +010077 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -070078 "../rtc_base:rtc_task_queue",
Sebastian Janssonecb68972019-01-18 10:30:54 +010079 "../rtc_base/task_utils:repeating_task",
mbonadei3edccb92017-06-01 04:47:20 -070080 "../system_wrappers",
Danil Chapovalovabd42732018-09-10 14:07:45 +020081 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov431abd92018-06-18 12:54:17 +020082 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -070083 ]
84}
85
ehmaldonado38a21322016-09-02 04:10:34 -070086rtc_source_set("rtp_test_utils") {
kjellander0f380d82016-06-01 04:48:26 -070087 testonly = true
88 sources = [
89 "rtcp_packet_parser.cc",
90 "rtcp_packet_parser.h",
91 "rtp_file_reader.cc",
92 "rtp_file_reader.h",
93 "rtp_file_writer.cc",
94 "rtp_file_writer.h",
95 ]
96
kjellandere40a7ee2016-10-16 23:56:12 -070097 if (!build_with_chromium && is_clang) {
98 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070099 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700100 }
101
102 deps = [
103 "..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700104 "../api:array_view",
kjellander0f380d82016-06-01 04:48:26 -0700105 "../modules/rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100106 "../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100107 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700108 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200109 "../rtc_base/system:arch",
kjellander0f380d82016-06-01 04:48:26 -0700110 "//testing/gtest",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000111 ]
112}
113
ehmaldonado38a21322016-09-02 04:10:34 -0700114rtc_source_set("field_trial") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000115 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -0700116 testonly = true
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000117 sources = [
118 "field_trial.cc",
119 "field_trial.h",
120 ]
121
122 deps = [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000123 "..:webrtc_common",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200124 "../system_wrappers:field_trial",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000125 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000126}
127
Edward Lemure66572b2018-01-05 15:34:09 +0100128rtc_source_set("perf_test") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000129 visibility = [ "*" ]
Edward Lemure66572b2018-01-05 15:34:09 +0100130 sources = [
131 "testsupport/perf_test.cc",
132 "testsupport/perf_test.h",
133 ]
134 deps = [
135 "..:webrtc_common",
136 "../api:array_view",
Oleh Prypind136b282018-10-03 13:53:44 +0200137 "../rtc_base:checks",
Edward Lemure66572b2018-01-05 15:34:09 +0100138 "../rtc_base:rtc_base_approved",
139 ]
140}
141
mbonadeicd95a4e2017-08-23 23:55:54 -0700142if (is_ios) {
143 rtc_source_set("test_support_objc") {
144 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700145 visibility = [ ":test_support" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700146 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +0100147 "ios/coverage_util_ios.h",
148 "ios/coverage_util_ios.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700149 "ios/test_support.h",
150 "ios/test_support.mm",
151 ]
denicijad207a392017-09-11 06:43:28 -0700152 deps = [
Edward Lemure66572b2018-01-05 15:34:09 +0100153 ":perf_test",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200154 "../sdk:helpers_objc",
denicijad207a392017-09-11 06:43:28 -0700155 ]
Artem Titarenko34fc3462018-11-06 12:29:29 +0100156 configs += [ ":test_support_objc_config" ]
157 }
158
159 config("test_support_objc_config") {
160 defines = []
161
162 if (use_clang_coverage) {
163 defines += [ "WEBRTC_IOS_ENABLE_COVERAGE" ]
164 }
mbonadeicd95a4e2017-08-23 23:55:54 -0700165 }
166}
167
Patrik Höglund34924c22018-01-19 09:11:07 +0100168config("suppress_warning_4373") {
169 if (is_win) {
170 cflags = [
171 # MSVC has a bug which generates this warning when using mocks; see the
172 # section on warning 4373 in he googlemock FAQ. This warning isn't the
173 # least relevant for us, anyway.
174 "/wd4373",
175 ]
176 }
177}
178
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200179config("test_main_direct_config") {
180 visibility = [ ":*" ]
181 defines = [ "UNIT_TEST" ]
182}
mbonadei148d5a22017-04-28 05:24:50 -0700183rtc_source_set("test_support") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000184 visibility = [ "*" ]
mbonadei148d5a22017-04-28 05:24:50 -0700185 testonly = true
kjellander32c4a202016-08-30 02:53:49 -0700186
Mirko Bonadei65ce3112018-01-26 11:57:47 +0100187 all_dependent_configs = [
188 ":suppress_warning_4373",
189 "//third_party/googletest:gmock_config",
190 "//third_party/googletest:gtest_config",
191 ]
Patrik Höglund34924c22018-01-19 09:11:07 +0100192
mbonadei148d5a22017-04-28 05:24:50 -0700193 sources = [
194 "gmock.h",
195 "gtest.h",
mbonadei148d5a22017-04-28 05:24:50 -0700196 ]
197
Patrik Höglund7696bef2018-03-15 15:05:39 +0100198 public_deps = []
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200199 if (is_ios) {
mbonadeicd95a4e2017-08-23 23:55:54 -0700200 public_deps += [ ":test_support_objc" ]
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200201 }
202
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200203 public_configs = [ ":test_main_direct_config" ]
mbonadei148d5a22017-04-28 05:24:50 -0700204 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700205 "../rtc_base:rtc_base_approved",
mbonadei148d5a22017-04-28 05:24:50 -0700206 "//testing/gmock",
207 "//testing/gtest",
208 ]
209
mbonadei148d5a22017-04-28 05:24:50 -0700210 if (!build_with_chromium && is_clang) {
211 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
212 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
213 }
kjellander32c4a202016-08-30 02:53:49 -0700214}
215
oprypinfbbba3f2017-09-25 08:34:41 -0700216if (rtc_include_tests) {
Artem Titov40a7a352018-10-15 15:25:34 +0200217 rtc_source_set("test_main_lib") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000218 visibility = [ "*" ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200219 testonly = true
Oleh Prypin5ab68542017-09-25 09:18:00 +0000220 sources = [
Artem Titov40a7a352018-10-15 15:25:34 +0200221 "test_main_lib.cc",
222 "test_main_lib.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000223 ]
224
Oleh Prypin5ab68542017-09-25 09:18:00 +0000225 deps = [
226 ":field_trial",
Edward Lemure66572b2018-01-05 15:34:09 +0100227 ":perf_test",
Artem Titov40a7a352018-10-15 15:25:34 +0200228 ":test_support",
Yves Gerey3e707812018-11-28 16:47:49 +0100229 "../rtc_base:checks",
Niels Möller8909a632018-09-06 08:42:44 +0200230 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200231 "../system_wrappers:field_trial",
232 "../system_wrappers:metrics",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000233 "//testing/gtest",
Yves Gerey3e707812018-11-28 16:47:49 +0100234 "//third_party/abseil-cpp/absl/memory",
Patrik Höglund77301932018-10-09 15:09:51 +0200235
236 # TODO(bugs.webrtc.org/9792): This is needed for downstream projects on
237 # Android, where it's replaced by an internal version of fileutils that
238 # has a certain flag. Remove this once the internal fileutils has been
239 # eliminated.
240 "../test:fileutils",
mbonadei9452c622017-04-27 12:29:29 -0700241 ]
242 }
mbonadei9452c622017-04-27 12:29:29 -0700243
Artem Titov40a7a352018-10-15 15:25:34 +0200244 rtc_source_set("test_main") {
245 visibility = [ "*" ]
246 testonly = true
247 sources = [
248 "test_main.cc",
249 ]
250
251 deps = [
252 ":test_main_lib",
253 ]
254 }
255
Oleh Prypin5ab68542017-09-25 09:18:00 +0000256 rtc_source_set("video_test_support") {
257 testonly = true
258
259 sources = [
260 "testsupport/frame_reader.h",
261 "testsupport/frame_writer.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000262 "testsupport/mock/mock_frame_reader.h",
Artem Titov08a9b612019-01-17 21:37:19 +0100263 "testsupport/video_frame_writer.cc",
264 "testsupport/video_frame_writer.h",
Artem Titov645df9e2019-01-14 14:21:59 +0100265 "testsupport/y4m_frame_reader.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000266 "testsupport/y4m_frame_writer.cc",
267 "testsupport/yuv_frame_reader.cc",
268 "testsupport/yuv_frame_writer.cc",
269 ]
270
271 deps = [
Patrik Höglund7696bef2018-03-15 15:05:39 +0100272 ":fileutils",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000273 ":test_support",
274 ":video_test_common",
275 "..:webrtc_common",
Artem Titov08a9b612019-01-17 21:37:19 +0100276 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200277 "../api/video:video_frame",
278 "../api/video:video_frame_i420",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000279 "../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100280 "../rtc_base:checks",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000281 "../rtc_base:rtc_base_approved",
282 "../system_wrappers",
Artem Titov08a9b612019-01-17 21:37:19 +0100283 "//third_party/abseil-cpp/absl/memory:memory",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100284 "//third_party/libyuv",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000285 ]
286
287 if (!is_ios) {
288 deps += [ "//third_party:jpeg" ]
289 sources += [ "testsupport/jpeg_frame_writer.cc" ]
290 } else {
291 sources += [ "testsupport/jpeg_frame_writer_ios.cc" ]
292 }
293
Oleh Prypin5ab68542017-09-25 09:18:00 +0000294 if (!build_with_chromium && is_clang) {
295 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
296 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
297 }
298
299 if (is_android) {
300 deps += [ "//base:base" ]
301 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000302 }
303
Edward Lemuraf8659a2017-09-27 14:46:24 +0200304 rtc_source_set("test_support_test_artifacts") {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000305 testonly = true
306 sources = [
Edward Lemuraf8659a2017-09-27 14:46:24 +0200307 "testsupport/test_artifacts.cc",
308 "testsupport/test_artifacts.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000309 ]
310 deps = [
311 ":fileutils",
312 "../rtc_base:rtc_base_approved",
Niels Möllerb7edf692019-02-08 16:40:53 +0100313 "../rtc_base/system:file_wrapper",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000314 ]
315 }
316
317 test_support_unittests_resources = [
318 "../resources/foreman_cif_short.yuv",
319 "../resources/video_coding/frame-ethernet-ii.pcap",
320 "../resources/video_coding/frame-loopback.pcap",
321 "../resources/video_coding/pltype103.rtp",
322 "../resources/video_coding/pltype103_header_only.rtp",
323 "../resources/video_coding/ssrcs-2.pcap",
324 "../resources/video_coding/ssrcs-3.pcap",
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200325 ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200326
327 if (is_ios) {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000328 bundle_data("test_support_unittests_bundle_data") {
329 testonly = true
330 sources = test_support_unittests_resources
331 outputs = [
332 "{{bundle_resources_dir}}/{{source_file_part}}",
333 ]
334 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200335 }
336
Oleh Prypin5ab68542017-09-25 09:18:00 +0000337 rtc_test("test_support_unittests") {
338 deps = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800339 ":call_config_utils",
Artem Titov66a29b92019-01-15 14:43:20 +0100340 ":copy_to_file_audio_capturer_unittest",
Sebastian Jansson09408112018-04-24 14:41:22 +0200341 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200342 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100343 ":fileutils",
Mirko Bonadei46399992018-08-22 15:32:38 +0200344 ":fileutils_unittests",
Edward Lemure66572b2018-01-05 15:34:09 +0100345 ":perf_test",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000346 ":rtp_test_utils",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200347 ":test_common",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200348 ":test_main",
349 ":test_support",
350 ":test_support_test_artifacts",
351 ":video_test_common",
352 ":video_test_support",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200353 "../api:create_simulcast_test_fixture_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100354 "../api:scoped_refptr",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200355 "../api:simulcast_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200356 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800357 "../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100358 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200359 "../api/video:video_frame_i420",
Benjamin Wright9db8b882019-01-14 15:30:20 -0800360 "../call:video_stream_api",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200361 "../modules/rtp_rtcp:rtp_rtcp",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200362 "../modules/video_capture",
363 "../modules/video_coding:simulcast_test_fixture_impl",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000364 "../rtc_base:rtc_base_approved",
Niels Möllerb7edf692019-02-08 16:40:53 +0100365 "../rtc_base/system:file_wrapper",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200366 "../test:single_threaded_task_queue",
Artem Titov4895b452019-01-14 16:54:04 +0100367 "pc/e2e:e2e_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +0200368 "scenario:scenario_unittests",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200369 "//testing/gmock",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200370 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200371 "//third_party/abseil-cpp/absl/memory",
Artem Titov645df9e2019-01-14 14:21:59 +0100372 "//third_party/abseil-cpp/absl/strings",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000373 ]
374 sources = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800375 "call_config_utils_unittest.cc",
Sebastian Jansson09408112018-04-24 14:41:22 +0200376 "direct_transport_unittest.cc",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200377 "fake_vp8_encoder_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000378 "frame_generator_unittest.cc",
379 "rtp_file_reader_unittest.cc",
380 "rtp_file_writer_unittest.cc",
381 "single_threaded_task_queue_unittest.cc",
382 "testsupport/always_passing_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000383 "testsupport/perf_test_unittest.cc",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200384 "testsupport/test_artifacts_unittest.cc",
Artem Titov08a9b612019-01-17 21:37:19 +0100385 "testsupport/video_frame_writer_unittest.cc",
Artem Titov645df9e2019-01-14 14:21:59 +0100386 "testsupport/y4m_frame_reader_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000387 "testsupport/y4m_frame_writer_unittest.cc",
388 "testsupport/yuv_frame_reader_unittest.cc",
389 "testsupport/yuv_frame_writer_unittest.cc",
390 ]
391
Oleh Prypin5ab68542017-09-25 09:18:00 +0000392 if (!build_with_chromium && is_clang) {
393 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
394 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
395 }
396
397 data = test_support_unittests_resources
398 if (is_android) {
399 deps += [ "//testing/android/native_test:native_test_support" ]
400 shard_timeout = 900
401 }
402
403 if (is_ios) {
404 deps += [ ":test_support_unittests_bundle_data" ]
405 }
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200406
Mirko Bonadei9098b302018-04-06 10:48:10 +0200407 if (!is_android && !build_with_chromium) {
408 # This is needed in order to avoid:
409 # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create
410 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
411 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000412 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200413}
414
mbonadeicd95a4e2017-08-23 23:55:54 -0700415if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200416 rtc_source_set("fileutils_ios_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200417 visibility = [
418 ":fileutils",
419 ":fileutils_override_impl",
420 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700421 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800422 "testsupport/ios_file_utils.h",
423 "testsupport/ios_file_utils.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700424 ]
425 deps = [
426 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100427 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700428 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200429 "../sdk:helpers_objc",
mbonadeicd95a4e2017-08-23 23:55:54 -0700430 ]
431 }
432}
433
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200434if (is_mac) {
435 rtc_source_set("fileutils_mac_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200436 visibility = [
437 ":fileutils",
438 ":fileutils_override_impl",
439 ]
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200440 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800441 "testsupport/mac_file_utils.h",
442 "testsupport/mac_file_utils.mm",
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200443 ]
444 deps = [
445 "../rtc_base:checks",
446 ]
447 }
448}
449
mbonadei9452c622017-04-27 12:29:29 -0700450rtc_source_set("fileutils") {
451 testonly = true
Patrik Höglund7696bef2018-03-15 15:05:39 +0100452 visibility = [ "*" ]
mbonadei9452c622017-04-27 12:29:29 -0700453 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800454 "testsupport/file_utils.cc",
455 "testsupport/file_utils.h",
mbonadei9452c622017-04-27 12:29:29 -0700456 ]
mbonadei3edccb92017-06-01 04:47:20 -0700457 deps = [
Artem Titov8f726be2018-10-23 15:50:10 +0200458 ":fileutils_override_api",
459 ":fileutils_override_impl",
460 "..:webrtc_common",
461 "../rtc_base:checks",
462 "../rtc_base:rtc_base_approved",
463 "../rtc_base/system:arch",
464 "//third_party/abseil-cpp/absl/types:optional",
465 ]
466 if (is_ios) {
467 deps += [ ":fileutils_ios_objc" ]
468 }
469 if (is_mac) {
470 deps += [ ":fileutils_mac_objc" ]
471 }
472 if (is_win) {
473 deps += [ "../rtc_base:rtc_base" ]
474 }
475}
476
477# We separate header into own target to make it possible for downstream
478# projects to override implementation.
479rtc_source_set("fileutils_override_api") {
480 testonly = true
481 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800482 "testsupport/file_utils_override.h",
Artem Titov8f726be2018-10-23 15:50:10 +0200483 ]
484}
485
486rtc_source_set("fileutils_override_impl") {
487 testonly = true
488 visibility = [ ":fileutils" ]
489 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800490 "testsupport/file_utils_override.cc",
Artem Titov8f726be2018-10-23 15:50:10 +0200491 ]
492 deps = [
493 ":fileutils_override_api",
mbonadei3edccb92017-06-01 04:47:20 -0700494 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100495 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700496 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200497 "../rtc_base/system:arch",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200498 "//third_party/abseil-cpp/absl/types:optional",
mbonadei3edccb92017-06-01 04:47:20 -0700499 ]
mbonadei9452c622017-04-27 12:29:29 -0700500 if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200501 deps += [ ":fileutils_ios_objc" ]
502 }
503 if (is_mac) {
504 deps += [ ":fileutils_mac_objc" ]
mbonadei3edccb92017-06-01 04:47:20 -0700505 }
506 if (is_win) {
ehmaldonadof6a861a2017-07-19 10:40:47 -0700507 deps += [ "../rtc_base:rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700508 }
mbonadei9452c622017-04-27 12:29:29 -0700509}
510
511rtc_source_set("run_test") {
512 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700513 if (is_mac) {
514 public_deps = [
515 ":run_test_objc",
516 ]
517 } else {
518 public_deps = [
519 ":run_test_generic",
520 ]
521 }
522}
523
524rtc_source_set("run_test_interface") {
mbonadei9452c622017-04-27 12:29:29 -0700525 sources = [
526 "run_test.h",
527 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700528}
529
530if (is_mac) {
531 rtc_source_set("run_test_objc") {
532 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700533 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700534 sources = [
535 "mac/run_test.mm",
536 ]
mbonadei9c296b32017-09-05 05:11:41 -0700537 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700538 ":run_test_interface",
539 ]
mbonadei9452c622017-04-27 12:29:29 -0700540 }
541}
542
mbonadeicd95a4e2017-08-23 23:55:54 -0700543rtc_source_set("run_test_generic") {
544 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700545 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700546 sources = [
547 "run_test.cc",
548 ]
mbonadei9c296b32017-09-05 05:11:41 -0700549 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700550 ":run_test_interface",
551 ]
552}
553
ehmaldonado37535bf2016-12-05 06:42:45 -0800554rtc_source_set("fileutils_unittests") {
555 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700556 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800557 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800558 "testsupport/file_utils_unittest.cc",
ehmaldonado37535bf2016-12-05 06:42:45 -0800559 ]
560 deps = [
561 ":fileutils",
mbonadei3edccb92017-06-01 04:47:20 -0700562 ":test_support",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100563 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700564 "../rtc_base:rtc_base_approved",
ehmaldonado37535bf2016-12-05 06:42:45 -0800565 "//testing/gtest",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200566 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado37535bf2016-12-05 06:42:45 -0800567 ]
568}
kjellander0f380d82016-06-01 04:48:26 -0700569
perkj488c5dc2017-02-08 05:55:51 -0800570rtc_source_set("direct_transport") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000571 visibility = [ "*" ]
perkj488c5dc2017-02-08 05:55:51 -0800572 testonly = true
573 sources = [
574 "direct_transport.cc",
575 "direct_transport.h",
perkj488c5dc2017-02-08 05:55:51 -0800576 ]
577 if (!build_with_chromium && is_clang) {
578 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
579 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
580 }
581 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700582 "..:webrtc_common",
Artem Titov46c4e602018-08-17 14:26:54 +0200583 "../api:simulated_network_api",
perkj488c5dc2017-02-08 05:55:51 -0800584 "../api:transport_api",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100585 "../call:call_interfaces",
Artem Titov46c4e602018-08-17 14:26:54 +0200586 "../call:simulated_packet_receiver",
mbonadei3edccb92017-06-01 04:47:20 -0700587 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700588 "../rtc_base:rtc_base_approved",
eladalon413ee9a2017-08-22 04:02:52 -0700589 "../rtc_base:sequenced_task_checker",
mbonadei3edccb92017-06-01 04:47:20 -0700590 "../system_wrappers",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200591 "//third_party/abseil-cpp/absl/memory",
perkj488c5dc2017-02-08 05:55:51 -0800592 ]
eladalon413ee9a2017-08-22 04:02:52 -0700593 public_deps = [
594 ":single_threaded_task_queue",
Erik Språng09708512018-03-14 15:16:50 +0100595 "../call:fake_network",
eladalon413ee9a2017-08-22 04:02:52 -0700596 ]
597}
598
599rtc_source_set("single_threaded_task_queue") {
600 testonly = true
601 sources = [
602 "single_threaded_task_queue.cc",
603 "single_threaded_task_queue.h",
604 ]
605 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100606 "../rtc_base:checks",
eladalon413ee9a2017-08-22 04:02:52 -0700607 "../rtc_base:rtc_base_approved",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200608 "//third_party/abseil-cpp/absl/memory",
eladalon413ee9a2017-08-22 04:02:52 -0700609 ]
perkj488c5dc2017-02-08 05:55:51 -0800610}
611
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200612rtc_source_set("fake_video_codecs") {
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -0500613 allow_poison = [ "software_video_codecs" ]
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200614 visibility = [ "*" ]
615 sources = [
616 "configurable_frame_size_encoder.cc",
617 "configurable_frame_size_encoder.h",
618 "fake_decoder.cc",
619 "fake_decoder.h",
620 "fake_encoder.cc",
621 "fake_encoder.h",
Per Kjellander841c9122018-10-04 18:40:28 +0200622 "fake_vp8_decoder.cc",
623 "fake_vp8_decoder.h",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200624 "fake_vp8_encoder.cc",
625 "fake_vp8_encoder.h",
626 ]
627 if (!build_with_chromium && is_clang) {
628 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
629 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
630 }
631 deps = [
632 "..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100633 "../api:scoped_refptr",
Niels Möller4dc66c52018-10-05 14:17:58 +0200634 "../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +0100635 "../api/video:video_bitrate_allocation",
636 "../api/video:video_frame",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200637 "../api/video:video_frame_i420",
Erik Språng4529fbc2018-10-12 10:30:31 +0200638 "../api/video_codecs:create_vp8_temporal_layers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200639 "../api/video_codecs:video_codecs_api",
640 "../common_video:common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100641 "../modules:module_api",
642 "../modules/video_coding:codec_globals_headers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200643 "../modules/video_coding:video_codec_interface",
644 "../modules/video_coding:video_coding_utility",
645 "../modules/video_coding:webrtc_h264",
646 "../modules/video_coding:webrtc_vp8",
647 "../modules/video_coding:webrtc_vp9",
648 "../rtc_base:checks",
649 "../rtc_base:rtc_base_approved",
650 "../rtc_base:rtc_task_queue",
651 "../rtc_base:sequenced_task_checker",
652 "../system_wrappers",
Yves Gerey3e707812018-11-28 16:47:49 +0100653 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200654 ]
655}
656
ehmaldonado38a21322016-09-02 04:10:34 -0700657rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700658 testonly = true
659 sources = [
660 "call_test.cc",
661 "call_test.h",
kjellander0f380d82016-06-01 04:48:26 -0700662 "constants.cc",
663 "constants.h",
kjellander0f380d82016-06-01 04:48:26 -0700664 "drifting_clock.cc",
665 "drifting_clock.h",
666 "encoder_settings.cc",
667 "encoder_settings.h",
sakal55d932b2016-09-30 06:19:08 -0700668 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700669 "layer_filtering_transport.cc",
670 "layer_filtering_transport.h",
Danil Chapovalovdd7e2842018-03-09 15:37:03 +0000671 "mock_transport.cc",
kjellander0f380d82016-06-01 04:48:26 -0700672 "mock_transport.h",
kjellander0f380d82016-06-01 04:48:26 -0700673 "null_transport.cc",
674 "null_transport.h",
675 "rtp_rtcp_observer.h",
676 "statistics.cc",
677 "statistics.h",
Niels Möllercbcbc222018-09-28 09:07:24 +0200678 "video_decoder_proxy_factory.h",
679 "video_encoder_proxy_factory.h",
kjellander0f380d82016-06-01 04:48:26 -0700680 ]
Robin Raymondce1b1402018-11-22 20:10:11 -0500681 if (current_os != "winuwp") {
682 # The filtering of *_win.cc is not done for WinUWP (intentionally) as
683 # most _win.cc files are compatible with WinUWP. However, the
684 # peek/dispatch Win32 runloops are entirely WinUWP incompatible thus
685 # WinUWP uses the generic runloop as defined for non-Windows targets.
686 sources += [ "win/run_loop_win.cc" ]
687 }
688 if (!is_win || current_os == "winuwp") {
kjellander0f380d82016-06-01 04:48:26 -0700689 sources += [
690 "run_loop.cc",
691 "run_loop.h",
692 ]
693 }
694
kjellandere40a7ee2016-10-16 23:56:12 -0700695 if (!build_with_chromium && is_clang) {
696 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700697 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700698 }
699
700 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800701 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200702 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100703 ":fileutils",
kjellander0f380d82016-06-01 04:48:26 -0700704 ":rtp_test_utils",
705 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800706 ":video_test_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100707 "../:webrtc_common",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100708 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100709 "../api:scoped_refptr",
Artem Titov46c4e602018-08-17 14:26:54 +0200710 "../api:simulated_network_api",
mbonadei3edccb92017-06-01 04:47:20 -0700711 "../api:transport_api",
mbonadei3edccb92017-06-01 04:47:20 -0700712 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700713 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalovddc84e92018-10-24 17:01:58 +0200714 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800715 "../api/video:builtin_video_bitrate_allocator_factory",
716 "../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200717 "../api/video:video_frame",
ilnikd60d06a2017-04-05 03:02:20 -0700718 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700719 "../audio",
kjellander94cee312016-06-10 01:56:57 -0700720 "../call",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100721 "../call:call_interfaces",
Artem Titov4e199e92018-08-20 13:30:39 +0200722 "../call:fake_network",
Yves Gerey3e707812018-11-28 16:47:49 +0100723 "../call:rtp_interfaces",
sprangdb2a9fc2017-08-09 06:42:32 -0700724 "../call:rtp_sender",
Artem Titov4e199e92018-08-20 13:30:39 +0200725 "../call:simulated_network",
Artem Titov46c4e602018-08-17 14:26:54 +0200726 "../call:simulated_packet_receiver",
aleloi440b6d92017-08-22 05:43:23 -0700727 "../call:video_stream_api",
mbonadei3edccb92017-06-01 04:47:20 -0700728 "../logging:rtc_event_log_api",
Qingsi Wang970b0882018-02-01 11:04:46 -0800729 "../logging:rtc_event_log_impl_base",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800730 "../media:rtc_internal_video_codecs",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100731 "../media:rtc_media_base",
Artem Titov3faa8322018-03-07 14:44:00 +0100732 "../modules/audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100733 "../modules/audio_device:audio_device_impl",
mbonadei3edccb92017-06-01 04:47:20 -0700734 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800735 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800736 "../modules/audio_processing",
mbonadei3edccb92017-06-01 04:47:20 -0700737 "../modules/rtp_rtcp",
738 "../modules/rtp_rtcp:mock_rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100739 "../modules/rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100740 "../modules/rtp_rtcp:rtp_video_header",
741 "../modules/video_coding:codec_globals_headers",
charujaincb728ea2017-09-18 03:08:08 -0700742 "../modules/video_coding:video_coding_utility",
mbonadei3edccb92017-06-01 04:47:20 -0700743 "../modules/video_coding:webrtc_h264",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800744 "../modules/video_coding:webrtc_multiplex",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200745 "../modules/video_coding:webrtc_vp8",
mbonadei3edccb92017-06-01 04:47:20 -0700746 "../modules/video_coding:webrtc_vp9",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100747 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700748 "../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -0700749 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200750 "../system_wrappers:field_trial",
kjellander94cee312016-06-10 01:56:57 -0700751 "../video",
kjellander0f380d82016-06-01 04:48:26 -0700752 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200753 "//third_party/abseil-cpp/absl/memory",
kjellander0f380d82016-06-01 04:48:26 -0700754 ]
mbonadei148d5a22017-04-28 05:24:50 -0700755 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700756 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
757 }
kjellander0f380d82016-06-01 04:48:26 -0700758}
759
ehmaldonado38a21322016-09-02 04:10:34 -0700760rtc_source_set("test_renderer") {
mbonadei9c296b32017-09-05 05:11:41 -0700761 public_deps = [
762 ":test_renderer_generic",
763 ]
kjellander0f380d82016-06-01 04:48:26 -0700764 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700765 if (is_mac) {
mbonadei9c296b32017-09-05 05:11:41 -0700766 public_deps += [ ":test_renderer_objc" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700767 }
768}
769
770if (is_mac) {
771 rtc_source_set("test_renderer_objc") {
772 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700773 visibility = [ ":test_renderer" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700774 sources = [
775 "mac/video_renderer_mac.h",
776 "mac/video_renderer_mac.mm",
777 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700778 deps = [
mbonadei9c296b32017-09-05 05:11:41 -0700779 ":test_renderer_generic",
mbonadeicd95a4e2017-08-23 23:55:54 -0700780 "../rtc_base:rtc_base_approved",
781 ]
782 libs = [
783 "Cocoa.framework",
784 "OpenGL.framework",
785 "CoreVideo.framework",
786 ]
787 if (!build_with_chromium && is_clang) {
788 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
789 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
790 }
791 }
792}
793
794rtc_source_set("test_renderer_generic") {
795 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700796 visibility = [
797 ":test_renderer",
798 ":test_renderer_objc",
799 ]
kjellander0f380d82016-06-01 04:48:26 -0700800 libs = []
801 sources = [
kjellander0f380d82016-06-01 04:48:26 -0700802 "video_renderer.cc",
803 "video_renderer.h",
804 "win/d3d_renderer.cc",
805 "win/d3d_renderer.h",
806 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700807 deps = [
808 ":test_support",
809 "..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100810 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200811 "../api/video:video_frame",
mbonadeicd95a4e2017-08-23 23:55:54 -0700812 "../common_video",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100813 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100814 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700815 "../rtc_base:rtc_base_approved",
816 "//testing/gtest",
817 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100818 if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) {
kjellander0f380d82016-06-01 04:48:26 -0700819 sources += [ "null_platform_renderer.cc" ]
820 }
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100821 if ((is_linux && rtc_use_x11) || is_mac) {
kjellander0f380d82016-06-01 04:48:26 -0700822 sources += [
823 "gl/gl_renderer.cc",
824 "gl/gl_renderer.h",
825 ]
826 }
827
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100828 if (is_linux && rtc_use_x11) {
Edward Lemur84a87c42017-11-07 19:07:31 +0100829 sources += [
830 "linux/glx_renderer.cc",
831 "linux/glx_renderer.h",
832 "linux/video_renderer_linux.cc",
833 ]
kjellander0f380d82016-06-01 04:48:26 -0700834 libs += [
835 "Xext",
836 "X11",
837 "GL",
838 ]
839 }
840 if (is_android) {
841 libs += [
842 "GLESv2",
843 "log",
844 ]
845 }
kjellander0f380d82016-06-01 04:48:26 -0700846
kjellandere40a7ee2016-10-16 23:56:12 -0700847 if (!build_with_chromium && is_clang) {
848 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700849 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700850 }
kjellander0f380d82016-06-01 04:48:26 -0700851}
kwiberg37e99fd2017-04-10 05:15:48 -0700852
853rtc_source_set("audio_codec_mocks") {
854 testonly = true
855 sources = [
Niels Möller3f651d82018-12-19 15:06:17 +0100856 # TODO(nisse): Move these factories to their own target, to avoid
857 # unnecessary dependencies on gmock and gtest.
Niels Möllerb7180c02018-12-06 13:07:11 +0100858 "audio_decoder_proxy_factory.h",
Niels Möllera0f44302018-11-30 10:45:12 +0100859 "function_audio_decoder_factory.h",
kwiberg2b3aa142017-06-14 03:31:17 -0700860 "mock_audio_decoder.cc",
kwiberg37e99fd2017-04-10 05:15:48 -0700861 "mock_audio_decoder.h",
862 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700863 "mock_audio_encoder.cc",
864 "mock_audio_encoder.h",
865 "mock_audio_encoder_factory.h",
866 ]
867
868 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700869 ":test_support",
kwiberg529662a2017-09-04 05:43:17 -0700870 "../api:array_view",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100871 "../api:scoped_refptr",
ossueb1fde42017-05-02 06:46:30 -0700872 "../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -0700873 "../api/audio_codecs:builtin_audio_decoder_factory",
Niels Möllera0f44302018-11-30 10:45:12 +0100874 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700875 "../rtc_base:rtc_base_approved",
Niels Möllera0f44302018-11-30 10:45:12 +0100876 "//third_party/abseil-cpp/absl/memory",
kwiberg37e99fd2017-04-10 05:15:48 -0700877 ]
878}
sakald7fdb802017-05-26 01:51:53 -0700879
Artem Titov66a29b92019-01-15 14:43:20 +0100880rtc_source_set("copy_to_file_audio_capturer") {
881 testonly = true
882 sources = [
883 "testsupport/copy_to_file_audio_capturer.cc",
884 "testsupport/copy_to_file_audio_capturer.h",
885 ]
886 deps = [
887 "../api:array_view",
888 "../common_audio:common_audio",
889 "../modules/audio_device:audio_device_impl",
890 "../rtc_base:rtc_base_approved",
891 "//third_party/abseil-cpp/absl/memory",
892 "//third_party/abseil-cpp/absl/types:optional",
893 ]
894}
895
896rtc_source_set("copy_to_file_audio_capturer_unittest") {
897 testonly = true
898 sources = [
899 "testsupport/copy_to_file_audio_capturer_unittest.cc",
900 ]
901 deps = [
902 ":copy_to_file_audio_capturer",
903 ":fileutils",
904 ":test_support",
905 "../modules/audio_device:audio_device_impl",
906 "//third_party/abseil-cpp/absl/memory",
907 ]
908}
909
sakald7fdb802017-05-26 01:51:53 -0700910if (!build_with_chromium && is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000911 rtc_android_library("native_test_java") {
sakald7fdb802017-05-26 01:51:53 -0700912 testonly = true
913 java_files = [
914 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
915 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
916 ]
917 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700918 "../rtc_base:base_java",
sakald7fdb802017-05-26 01:51:53 -0700919 "//testing/android/native_test:native_test_java",
sakald7fdb802017-05-26 01:51:53 -0700920 ]
921 }
922}
Benjamin Wright8efafdf2019-01-11 10:48:42 -0800923
924rtc_source_set("call_config_utils") {
925 sources = [
926 "call_config_utils.cc",
927 "call_config_utils.h",
928 ]
929 deps = [
930 "../call:call_interfaces",
931 "../call:video_stream_api",
932 "../rtc_base:rtc_json",
933 ]
934}