blob: 8acc26d6f3f519507d97daa38477c2ae6ecbfdf4 [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",
ehmaldonado656610f2017-02-06 02:21:11 -080052 "vcm_capturer.cc",
53 "vcm_capturer.h",
mflodman351424e2017-08-10 02:43:14 -070054 "video_codec_settings.h",
kjellander0f380d82016-06-01 04:48:26 -070055 ]
56
kjellandere40a7ee2016-10-16 23:56:12 -070057 if (!build_with_chromium && is_clang) {
58 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070059 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070060 }
61
62 deps = [
mbonadei3edccb92017-06-01 04:47:20 -070063 "..:webrtc_common",
Patrik Höglund9e194032018-01-04 15:58:20 +010064 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +010065 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020066 "../api/video:video_frame",
Emircan Uysaler0823eec2018-07-13 17:10:00 -070067 "../api/video:video_frame_i010",
Niels Möllerc6ce9c52018-05-11 11:15:30 +020068 "../api/video:video_frame_i420",
mflodman351424e2017-08-10 02:43:14 -070069 "../api/video_codecs:video_codecs_api",
aleloi440b6d92017-08-22 05:43:23 -070070 "../call:video_stream_api",
kjellander0f380d82016-06-01 04:48:26 -070071 "../common_video",
sprangc5d62e22017-04-02 23:53:04 -070072 "../media:rtc_media_base",
ehmaldonado656610f2017-02-06 02:21:11 -080073 "../modules/video_capture:video_capture_module",
Patrik Höglunda8005cf2017-12-13 16:05:42 +010074 "../rtc_base:checks",
Patrik Höglund76df0df2017-12-19 11:50:21 +010075 "../rtc_base:rtc_base",
ehmaldonadof6a861a2017-07-19 10:40:47 -070076 "../rtc_base:rtc_task_queue",
Sebastian Janssonecb68972019-01-18 10:30:54 +010077 "../rtc_base/task_utils:repeating_task",
mbonadei3edccb92017-06-01 04:47:20 -070078 "../system_wrappers",
Danil Chapovalovabd42732018-09-10 14:07:45 +020079 "//third_party/abseil-cpp/absl/memory",
Danil Chapovalov431abd92018-06-18 12:54:17 +020080 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -070081 ]
82}
83
ehmaldonado38a21322016-09-02 04:10:34 -070084rtc_source_set("rtp_test_utils") {
kjellander0f380d82016-06-01 04:48:26 -070085 testonly = true
86 sources = [
87 "rtcp_packet_parser.cc",
88 "rtcp_packet_parser.h",
89 "rtp_file_reader.cc",
90 "rtp_file_reader.h",
91 "rtp_file_writer.cc",
92 "rtp_file_writer.h",
93 ]
94
kjellandere40a7ee2016-10-16 23:56:12 -070095 if (!build_with_chromium && is_clang) {
96 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070097 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070098 }
99
100 deps = [
101 "..:webrtc_common",
kwiberg529662a2017-09-04 05:43:17 -0700102 "../api:array_view",
kjellander0f380d82016-06-01 04:48:26 -0700103 "../modules/rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100104 "../modules/rtp_rtcp:rtp_rtcp_format",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100105 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700106 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200107 "../rtc_base/system:arch",
kjellander0f380d82016-06-01 04:48:26 -0700108 "//testing/gtest",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000109 ]
110}
111
ehmaldonado38a21322016-09-02 04:10:34 -0700112rtc_source_set("field_trial") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000113 visibility = [ "*" ]
kjellander0f380d82016-06-01 04:48:26 -0700114 testonly = true
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000115 sources = [
116 "field_trial.cc",
117 "field_trial.h",
118 ]
119
120 deps = [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000121 "..:webrtc_common",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200122 "../system_wrappers:field_trial",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000123 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000124}
125
Edward Lemure66572b2018-01-05 15:34:09 +0100126rtc_source_set("perf_test") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000127 visibility = [ "*" ]
Edward Lemure66572b2018-01-05 15:34:09 +0100128 sources = [
129 "testsupport/perf_test.cc",
130 "testsupport/perf_test.h",
131 ]
132 deps = [
133 "..:webrtc_common",
134 "../api:array_view",
Oleh Prypind136b282018-10-03 13:53:44 +0200135 "../rtc_base:checks",
Edward Lemure66572b2018-01-05 15:34:09 +0100136 "../rtc_base:rtc_base_approved",
137 ]
138}
139
mbonadeicd95a4e2017-08-23 23:55:54 -0700140if (is_ios) {
141 rtc_source_set("test_support_objc") {
142 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700143 visibility = [ ":test_support" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700144 sources = [
Artem Titarenko34fc3462018-11-06 12:29:29 +0100145 "ios/coverage_util_ios.h",
146 "ios/coverage_util_ios.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700147 "ios/test_support.h",
148 "ios/test_support.mm",
149 ]
denicijad207a392017-09-11 06:43:28 -0700150 deps = [
Edward Lemure66572b2018-01-05 15:34:09 +0100151 ":perf_test",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200152 "../sdk:helpers_objc",
denicijad207a392017-09-11 06:43:28 -0700153 ]
Artem Titarenko34fc3462018-11-06 12:29:29 +0100154 configs += [ ":test_support_objc_config" ]
155 }
156
157 config("test_support_objc_config") {
158 defines = []
159
160 if (use_clang_coverage) {
161 defines += [ "WEBRTC_IOS_ENABLE_COVERAGE" ]
162 }
mbonadeicd95a4e2017-08-23 23:55:54 -0700163 }
164}
165
Patrik Höglund34924c22018-01-19 09:11:07 +0100166config("suppress_warning_4373") {
167 if (is_win) {
168 cflags = [
169 # MSVC has a bug which generates this warning when using mocks; see the
170 # section on warning 4373 in he googlemock FAQ. This warning isn't the
171 # least relevant for us, anyway.
172 "/wd4373",
173 ]
174 }
175}
176
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200177config("test_main_direct_config") {
178 visibility = [ ":*" ]
179 defines = [ "UNIT_TEST" ]
180}
mbonadei148d5a22017-04-28 05:24:50 -0700181rtc_source_set("test_support") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000182 visibility = [ "*" ]
mbonadei148d5a22017-04-28 05:24:50 -0700183 testonly = true
kjellander32c4a202016-08-30 02:53:49 -0700184
Mirko Bonadei65ce3112018-01-26 11:57:47 +0100185 all_dependent_configs = [
186 ":suppress_warning_4373",
187 "//third_party/googletest:gmock_config",
188 "//third_party/googletest:gtest_config",
189 ]
Patrik Höglund34924c22018-01-19 09:11:07 +0100190
mbonadei148d5a22017-04-28 05:24:50 -0700191 sources = [
192 "gmock.h",
193 "gtest.h",
mbonadei148d5a22017-04-28 05:24:50 -0700194 ]
195
Patrik Höglund7696bef2018-03-15 15:05:39 +0100196 public_deps = []
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200197 if (is_ios) {
mbonadeicd95a4e2017-08-23 23:55:54 -0700198 public_deps += [ ":test_support_objc" ]
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200199 }
200
Sebastian Jansson2afd2812018-08-23 14:44:05 +0200201 public_configs = [ ":test_main_direct_config" ]
mbonadei148d5a22017-04-28 05:24:50 -0700202 deps = [
ehmaldonadof6a861a2017-07-19 10:40:47 -0700203 "../rtc_base:rtc_base_approved",
mbonadei148d5a22017-04-28 05:24:50 -0700204 "//testing/gmock",
205 "//testing/gtest",
206 ]
207
mbonadei148d5a22017-04-28 05:24:50 -0700208 if (!build_with_chromium && is_clang) {
209 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
210 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
211 }
kjellander32c4a202016-08-30 02:53:49 -0700212}
213
oprypinfbbba3f2017-09-25 08:34:41 -0700214if (rtc_include_tests) {
Artem Titov40a7a352018-10-15 15:25:34 +0200215 rtc_source_set("test_main_lib") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000216 visibility = [ "*" ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200217 testonly = true
Oleh Prypin5ab68542017-09-25 09:18:00 +0000218 sources = [
Artem Titov40a7a352018-10-15 15:25:34 +0200219 "test_main_lib.cc",
220 "test_main_lib.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000221 ]
222
Oleh Prypin5ab68542017-09-25 09:18:00 +0000223 deps = [
224 ":field_trial",
Edward Lemure66572b2018-01-05 15:34:09 +0100225 ":perf_test",
Artem Titov40a7a352018-10-15 15:25:34 +0200226 ":test_support",
Yves Gerey3e707812018-11-28 16:47:49 +0100227 "../rtc_base:checks",
Niels Möller8909a632018-09-06 08:42:44 +0200228 "../rtc_base:rtc_base",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200229 "../system_wrappers:field_trial",
230 "../system_wrappers:metrics",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000231 "//testing/gtest",
Yves Gerey3e707812018-11-28 16:47:49 +0100232 "//third_party/abseil-cpp/absl/memory",
Patrik Höglund77301932018-10-09 15:09:51 +0200233
234 # TODO(bugs.webrtc.org/9792): This is needed for downstream projects on
235 # Android, where it's replaced by an internal version of fileutils that
236 # has a certain flag. Remove this once the internal fileutils has been
237 # eliminated.
238 "../test:fileutils",
mbonadei9452c622017-04-27 12:29:29 -0700239 ]
240 }
mbonadei9452c622017-04-27 12:29:29 -0700241
Artem Titov40a7a352018-10-15 15:25:34 +0200242 rtc_source_set("test_main") {
243 visibility = [ "*" ]
244 testonly = true
245 sources = [
246 "test_main.cc",
247 ]
248
249 deps = [
250 ":test_main_lib",
251 ]
252 }
253
Oleh Prypin5ab68542017-09-25 09:18:00 +0000254 rtc_source_set("video_test_support") {
255 testonly = true
256
257 sources = [
258 "testsupport/frame_reader.h",
259 "testsupport/frame_writer.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000260 "testsupport/mock/mock_frame_reader.h",
Artem Titov08a9b612019-01-17 21:37:19 +0100261 "testsupport/video_frame_writer.cc",
262 "testsupport/video_frame_writer.h",
Artem Titov645df9e2019-01-14 14:21:59 +0100263 "testsupport/y4m_frame_reader.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000264 "testsupport/y4m_frame_writer.cc",
265 "testsupport/yuv_frame_reader.cc",
266 "testsupport/yuv_frame_writer.cc",
267 ]
268
269 deps = [
Patrik Höglund7696bef2018-03-15 15:05:39 +0100270 ":fileutils",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000271 ":test_support",
272 ":video_test_common",
273 "..:webrtc_common",
Artem Titov08a9b612019-01-17 21:37:19 +0100274 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200275 "../api/video:video_frame",
276 "../api/video:video_frame_i420",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000277 "../common_video",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100278 "../rtc_base:checks",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000279 "../rtc_base:rtc_base_approved",
280 "../system_wrappers",
Artem Titov08a9b612019-01-17 21:37:19 +0100281 "//third_party/abseil-cpp/absl/memory:memory",
Mirko Bonadei401d0562017-12-14 11:24:00 +0100282 "//third_party/libyuv",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000283 ]
284
285 if (!is_ios) {
286 deps += [ "//third_party:jpeg" ]
287 sources += [ "testsupport/jpeg_frame_writer.cc" ]
288 } else {
289 sources += [ "testsupport/jpeg_frame_writer_ios.cc" ]
290 }
291
Oleh Prypin5ab68542017-09-25 09:18:00 +0000292 if (!build_with_chromium && is_clang) {
293 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
294 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
295 }
296
297 if (is_android) {
298 deps += [ "//base:base" ]
299 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000300 }
301
Edward Lemuraf8659a2017-09-27 14:46:24 +0200302 rtc_source_set("test_support_test_artifacts") {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000303 testonly = true
304 sources = [
Edward Lemuraf8659a2017-09-27 14:46:24 +0200305 "testsupport/test_artifacts.cc",
306 "testsupport/test_artifacts.h",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000307 ]
308 deps = [
309 ":fileutils",
310 "../rtc_base:rtc_base_approved",
Niels Möllerb7edf692019-02-08 16:40:53 +0100311 "../rtc_base/system:file_wrapper",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000312 ]
313 }
314
315 test_support_unittests_resources = [
316 "../resources/foreman_cif_short.yuv",
317 "../resources/video_coding/frame-ethernet-ii.pcap",
318 "../resources/video_coding/frame-loopback.pcap",
319 "../resources/video_coding/pltype103.rtp",
320 "../resources/video_coding/pltype103_header_only.rtp",
321 "../resources/video_coding/ssrcs-2.pcap",
322 "../resources/video_coding/ssrcs-3.pcap",
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200323 ]
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200324
325 if (is_ios) {
Oleh Prypin5ab68542017-09-25 09:18:00 +0000326 bundle_data("test_support_unittests_bundle_data") {
327 testonly = true
328 sources = test_support_unittests_resources
329 outputs = [
330 "{{bundle_resources_dir}}/{{source_file_part}}",
331 ]
332 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200333 }
334
Oleh Prypin5ab68542017-09-25 09:18:00 +0000335 rtc_test("test_support_unittests") {
336 deps = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800337 ":call_config_utils",
Artem Titov66a29b92019-01-15 14:43:20 +0100338 ":copy_to_file_audio_capturer_unittest",
Sebastian Jansson09408112018-04-24 14:41:22 +0200339 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200340 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100341 ":fileutils",
Mirko Bonadei46399992018-08-22 15:32:38 +0200342 ":fileutils_unittests",
Edward Lemure66572b2018-01-05 15:34:09 +0100343 ":perf_test",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000344 ":rtp_test_utils",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200345 ":test_common",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200346 ":test_main",
347 ":test_support",
348 ":test_support_test_artifacts",
349 ":video_test_common",
350 ":video_test_support",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200351 "../api:create_simulcast_test_fixture_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100352 "../api:scoped_refptr",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200353 "../api:simulcast_test_fixture_api",
Danil Chapovalov99b71df2018-10-26 15:57:48 +0200354 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800355 "../api/video:builtin_video_bitrate_allocator_factory",
Yves Gerey3e707812018-11-28 16:47:49 +0100356 "../api/video:video_frame",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200357 "../api/video:video_frame_i420",
Benjamin Wright9db8b882019-01-14 15:30:20 -0800358 "../call:video_stream_api",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200359 "../modules/rtp_rtcp:rtp_rtcp",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200360 "../modules/video_capture",
361 "../modules/video_coding:simulcast_test_fixture_impl",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000362 "../rtc_base:rtc_base_approved",
Niels Möllerb7edf692019-02-08 16:40:53 +0100363 "../rtc_base/system:file_wrapper",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200364 "../test:single_threaded_task_queue",
Artem Titov4895b452019-01-14 16:54:04 +0100365 "pc/e2e:e2e_unittests",
Sebastian Jansson98b07e92018-09-27 13:47:01 +0200366 "scenario:scenario_unittests",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200367 "//testing/gmock",
Mirko Bonadei9098b302018-04-06 10:48:10 +0200368 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200369 "//third_party/abseil-cpp/absl/memory",
Artem Titov645df9e2019-01-14 14:21:59 +0100370 "//third_party/abseil-cpp/absl/strings",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000371 ]
372 sources = [
Benjamin Wright9db8b882019-01-14 15:30:20 -0800373 "call_config_utils_unittest.cc",
Sebastian Jansson09408112018-04-24 14:41:22 +0200374 "direct_transport_unittest.cc",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200375 "fake_vp8_encoder_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000376 "frame_generator_unittest.cc",
377 "rtp_file_reader_unittest.cc",
378 "rtp_file_writer_unittest.cc",
379 "single_threaded_task_queue_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000380 "testsupport/perf_test_unittest.cc",
Edward Lemuraf8659a2017-09-27 14:46:24 +0200381 "testsupport/test_artifacts_unittest.cc",
Artem Titov08a9b612019-01-17 21:37:19 +0100382 "testsupport/video_frame_writer_unittest.cc",
Artem Titov645df9e2019-01-14 14:21:59 +0100383 "testsupport/y4m_frame_reader_unittest.cc",
Oleh Prypin5ab68542017-09-25 09:18:00 +0000384 "testsupport/y4m_frame_writer_unittest.cc",
385 "testsupport/yuv_frame_reader_unittest.cc",
386 "testsupport/yuv_frame_writer_unittest.cc",
387 ]
388
Oleh Prypin5ab68542017-09-25 09:18:00 +0000389 if (!build_with_chromium && is_clang) {
390 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
391 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
392 }
393
394 data = test_support_unittests_resources
395 if (is_android) {
396 deps += [ "//testing/android/native_test:native_test_support" ]
397 shard_timeout = 900
398 }
399
400 if (is_ios) {
401 deps += [ ":test_support_unittests_bundle_data" ]
402 }
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200403
Mirko Bonadei9098b302018-04-06 10:48:10 +0200404 if (!is_android && !build_with_chromium) {
405 # This is needed in order to avoid:
406 # undefined symbol: webrtc::videocapturemodule::VideoCaptureImpl::Create
407 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
408 }
Oleh Prypin5ab68542017-09-25 09:18:00 +0000409 }
Oleh Prypin90ce84e2017-09-25 10:27:22 +0200410}
411
mbonadeicd95a4e2017-08-23 23:55:54 -0700412if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200413 rtc_source_set("fileutils_ios_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200414 visibility = [
415 ":fileutils",
416 ":fileutils_override_impl",
417 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700418 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800419 "testsupport/ios_file_utils.h",
420 "testsupport/ios_file_utils.mm",
mbonadeicd95a4e2017-08-23 23:55:54 -0700421 ]
422 deps = [
423 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100424 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700425 "../rtc_base:rtc_base_approved",
Anders Carlsson7bca8ca2018-08-30 09:30:29 +0200426 "../sdk:helpers_objc",
mbonadeicd95a4e2017-08-23 23:55:54 -0700427 ]
428 }
429}
430
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200431if (is_mac) {
432 rtc_source_set("fileutils_mac_objc") {
Artem Titov8f726be2018-10-23 15:50:10 +0200433 visibility = [
434 ":fileutils",
435 ":fileutils_override_impl",
436 ]
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200437 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800438 "testsupport/mac_file_utils.h",
439 "testsupport/mac_file_utils.mm",
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200440 ]
441 deps = [
442 "../rtc_base:checks",
443 ]
444 }
445}
446
mbonadei9452c622017-04-27 12:29:29 -0700447rtc_source_set("fileutils") {
448 testonly = true
Patrik Höglund7696bef2018-03-15 15:05:39 +0100449 visibility = [ "*" ]
mbonadei9452c622017-04-27 12:29:29 -0700450 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800451 "testsupport/file_utils.cc",
452 "testsupport/file_utils.h",
mbonadei9452c622017-04-27 12:29:29 -0700453 ]
mbonadei3edccb92017-06-01 04:47:20 -0700454 deps = [
Artem Titov8f726be2018-10-23 15:50:10 +0200455 ":fileutils_override_api",
456 ":fileutils_override_impl",
457 "..:webrtc_common",
458 "../rtc_base:checks",
459 "../rtc_base:rtc_base_approved",
460 "../rtc_base/system:arch",
461 "//third_party/abseil-cpp/absl/types:optional",
462 ]
463 if (is_ios) {
464 deps += [ ":fileutils_ios_objc" ]
465 }
466 if (is_mac) {
467 deps += [ ":fileutils_mac_objc" ]
468 }
469 if (is_win) {
470 deps += [ "../rtc_base:rtc_base" ]
471 }
472}
473
474# We separate header into own target to make it possible for downstream
475# projects to override implementation.
476rtc_source_set("fileutils_override_api") {
477 testonly = true
478 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800479 "testsupport/file_utils_override.h",
Artem Titov8f726be2018-10-23 15:50:10 +0200480 ]
481}
482
483rtc_source_set("fileutils_override_impl") {
484 testonly = true
485 visibility = [ ":fileutils" ]
486 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800487 "testsupport/file_utils_override.cc",
Artem Titov8f726be2018-10-23 15:50:10 +0200488 ]
489 deps = [
490 ":fileutils_override_api",
mbonadei3edccb92017-06-01 04:47:20 -0700491 "..:webrtc_common",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100492 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700493 "../rtc_base:rtc_base_approved",
Niels Möllera12c42a2018-07-25 16:05:48 +0200494 "../rtc_base/system:arch",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200495 "//third_party/abseil-cpp/absl/types:optional",
mbonadei3edccb92017-06-01 04:47:20 -0700496 ]
mbonadei9452c622017-04-27 12:29:29 -0700497 if (is_ios) {
Patrik Höglund8434aeb2018-10-05 14:52:11 +0200498 deps += [ ":fileutils_ios_objc" ]
499 }
500 if (is_mac) {
501 deps += [ ":fileutils_mac_objc" ]
mbonadei3edccb92017-06-01 04:47:20 -0700502 }
503 if (is_win) {
ehmaldonadof6a861a2017-07-19 10:40:47 -0700504 deps += [ "../rtc_base:rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700505 }
mbonadei9452c622017-04-27 12:29:29 -0700506}
507
508rtc_source_set("run_test") {
509 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700510 if (is_mac) {
511 public_deps = [
512 ":run_test_objc",
513 ]
514 } else {
515 public_deps = [
516 ":run_test_generic",
517 ]
518 }
519}
520
521rtc_source_set("run_test_interface") {
mbonadei9452c622017-04-27 12:29:29 -0700522 sources = [
523 "run_test.h",
524 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700525}
526
527if (is_mac) {
528 rtc_source_set("run_test_objc") {
529 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700530 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700531 sources = [
532 "mac/run_test.mm",
533 ]
mbonadei9c296b32017-09-05 05:11:41 -0700534 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700535 ":run_test_interface",
536 ]
mbonadei9452c622017-04-27 12:29:29 -0700537 }
538}
539
mbonadeicd95a4e2017-08-23 23:55:54 -0700540rtc_source_set("run_test_generic") {
541 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700542 visibility = [ ":run_test" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700543 sources = [
544 "run_test.cc",
545 ]
mbonadei9c296b32017-09-05 05:11:41 -0700546 deps = [
mbonadeicd95a4e2017-08-23 23:55:54 -0700547 ":run_test_interface",
548 ]
549}
550
ehmaldonado37535bf2016-12-05 06:42:45 -0800551rtc_source_set("fileutils_unittests") {
552 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700553 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800554 sources = [
Steve Anton10542f22019-01-11 09:11:00 -0800555 "testsupport/file_utils_unittest.cc",
ehmaldonado37535bf2016-12-05 06:42:45 -0800556 ]
557 deps = [
558 ":fileutils",
mbonadei3edccb92017-06-01 04:47:20 -0700559 ":test_support",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100560 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700561 "../rtc_base:rtc_base_approved",
ehmaldonado37535bf2016-12-05 06:42:45 -0800562 "//testing/gtest",
Danil Chapovalov431abd92018-06-18 12:54:17 +0200563 "//third_party/abseil-cpp/absl/types:optional",
ehmaldonado37535bf2016-12-05 06:42:45 -0800564 ]
565}
kjellander0f380d82016-06-01 04:48:26 -0700566
perkj488c5dc2017-02-08 05:55:51 -0800567rtc_source_set("direct_transport") {
Per Kjellandera7f2d842018-01-10 15:54:53 +0000568 visibility = [ "*" ]
perkj488c5dc2017-02-08 05:55:51 -0800569 testonly = true
570 sources = [
571 "direct_transport.cc",
572 "direct_transport.h",
perkj488c5dc2017-02-08 05:55:51 -0800573 ]
574 if (!build_with_chromium && is_clang) {
575 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
576 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
577 }
578 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700579 "..:webrtc_common",
Artem Titov46c4e602018-08-17 14:26:54 +0200580 "../api:simulated_network_api",
perkj488c5dc2017-02-08 05:55:51 -0800581 "../api:transport_api",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100582 "../call:call_interfaces",
Artem Titov46c4e602018-08-17 14:26:54 +0200583 "../call:simulated_packet_receiver",
mbonadei3edccb92017-06-01 04:47:20 -0700584 "../modules/rtp_rtcp",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700585 "../rtc_base:rtc_base_approved",
eladalon413ee9a2017-08-22 04:02:52 -0700586 "../rtc_base:sequenced_task_checker",
mbonadei3edccb92017-06-01 04:47:20 -0700587 "../system_wrappers",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200588 "//third_party/abseil-cpp/absl/memory",
perkj488c5dc2017-02-08 05:55:51 -0800589 ]
eladalon413ee9a2017-08-22 04:02:52 -0700590 public_deps = [
591 ":single_threaded_task_queue",
Erik Språng09708512018-03-14 15:16:50 +0100592 "../call:fake_network",
eladalon413ee9a2017-08-22 04:02:52 -0700593 ]
594}
595
596rtc_source_set("single_threaded_task_queue") {
597 testonly = true
598 sources = [
599 "single_threaded_task_queue.cc",
600 "single_threaded_task_queue.h",
601 ]
602 deps = [
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100603 "../rtc_base:checks",
eladalon413ee9a2017-08-22 04:02:52 -0700604 "../rtc_base:rtc_base_approved",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200605 "//third_party/abseil-cpp/absl/memory",
eladalon413ee9a2017-08-22 04:02:52 -0700606 ]
perkj488c5dc2017-02-08 05:55:51 -0800607}
608
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200609rtc_source_set("fake_video_codecs") {
Emircan Uysaler7c03bdc2019-01-16 15:07:56 -0500610 allow_poison = [ "software_video_codecs" ]
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200611 visibility = [ "*" ]
612 sources = [
613 "configurable_frame_size_encoder.cc",
614 "configurable_frame_size_encoder.h",
615 "fake_decoder.cc",
616 "fake_decoder.h",
617 "fake_encoder.cc",
618 "fake_encoder.h",
Per Kjellander841c9122018-10-04 18:40:28 +0200619 "fake_vp8_decoder.cc",
620 "fake_vp8_decoder.h",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200621 "fake_vp8_encoder.cc",
622 "fake_vp8_encoder.h",
623 ]
624 if (!build_with_chromium && is_clang) {
625 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
626 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
627 }
628 deps = [
629 "..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100630 "../api:scoped_refptr",
Niels Möller4dc66c52018-10-05 14:17:58 +0200631 "../api/video:encoded_image",
Yves Gerey3e707812018-11-28 16:47:49 +0100632 "../api/video:video_bitrate_allocation",
633 "../api/video:video_frame",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200634 "../api/video:video_frame_i420",
Erik Språng4529fbc2018-10-12 10:30:31 +0200635 "../api/video_codecs:create_vp8_temporal_layers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200636 "../api/video_codecs:video_codecs_api",
637 "../common_video:common_video",
Yves Gerey3e707812018-11-28 16:47:49 +0100638 "../modules:module_api",
639 "../modules/video_coding:codec_globals_headers",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200640 "../modules/video_coding:video_codec_interface",
641 "../modules/video_coding:video_coding_utility",
642 "../modules/video_coding:webrtc_h264",
643 "../modules/video_coding:webrtc_vp8",
644 "../modules/video_coding:webrtc_vp9",
645 "../rtc_base:checks",
646 "../rtc_base:rtc_base_approved",
647 "../rtc_base:rtc_task_queue",
648 "../rtc_base:sequenced_task_checker",
649 "../system_wrappers",
Yves Gerey3e707812018-11-28 16:47:49 +0100650 "//third_party/abseil-cpp/absl/types:optional",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200651 ]
652}
653
ehmaldonado38a21322016-09-02 04:10:34 -0700654rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700655 testonly = true
656 sources = [
657 "call_test.cc",
658 "call_test.h",
kjellander0f380d82016-06-01 04:48:26 -0700659 "drifting_clock.cc",
660 "drifting_clock.h",
661 "encoder_settings.cc",
662 "encoder_settings.h",
sakal55d932b2016-09-30 06:19:08 -0700663 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700664 "layer_filtering_transport.cc",
665 "layer_filtering_transport.h",
Danil Chapovalovdd7e2842018-03-09 15:37:03 +0000666 "mock_transport.cc",
kjellander0f380d82016-06-01 04:48:26 -0700667 "mock_transport.h",
kjellander0f380d82016-06-01 04:48:26 -0700668 "null_transport.cc",
669 "null_transport.h",
670 "rtp_rtcp_observer.h",
671 "statistics.cc",
672 "statistics.h",
Niels Möllercbcbc222018-09-28 09:07:24 +0200673 "video_decoder_proxy_factory.h",
674 "video_encoder_proxy_factory.h",
kjellander0f380d82016-06-01 04:48:26 -0700675 ]
Robin Raymondce1b1402018-11-22 20:10:11 -0500676 if (current_os != "winuwp") {
677 # The filtering of *_win.cc is not done for WinUWP (intentionally) as
678 # most _win.cc files are compatible with WinUWP. However, the
679 # peek/dispatch Win32 runloops are entirely WinUWP incompatible thus
680 # WinUWP uses the generic runloop as defined for non-Windows targets.
681 sources += [ "win/run_loop_win.cc" ]
682 }
683 if (!is_win || current_os == "winuwp") {
kjellander0f380d82016-06-01 04:48:26 -0700684 sources += [
685 "run_loop.cc",
686 "run_loop.h",
687 ]
688 }
689
kjellandere40a7ee2016-10-16 23:56:12 -0700690 if (!build_with_chromium && is_clang) {
691 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700692 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700693 }
694
695 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800696 ":direct_transport",
Ilya Nikolaevskiyb0588e62018-08-27 14:12:27 +0200697 ":fake_video_codecs",
Patrik Höglund7696bef2018-03-15 15:05:39 +0100698 ":fileutils",
kjellander0f380d82016-06-01 04:48:26 -0700699 ":rtp_test_utils",
700 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800701 ":video_test_common",
Yves Gerey3e707812018-11-28 16:47:49 +0100702 "../:webrtc_common",
Patrik Höglundbe214a22018-01-04 12:14:35 +0100703 "../api:libjingle_peerconnection_api",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100704 "../api:scoped_refptr",
Artem Titov46c4e602018-08-17 14:26:54 +0200705 "../api:simulated_network_api",
mbonadei3edccb92017-06-01 04:47:20 -0700706 "../api:transport_api",
mbonadei3edccb92017-06-01 04:47:20 -0700707 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700708 "../api/audio_codecs:builtin_audio_encoder_factory",
Danil Chapovalovddc84e92018-10-24 17:01:58 +0200709 "../api/test/video:function_video_factory",
Jiawei Ouc2ebe212018-11-08 10:02:56 -0800710 "../api/video:builtin_video_bitrate_allocator_factory",
711 "../api/video:video_bitrate_allocator_factory",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200712 "../api/video:video_frame",
ilnikd60d06a2017-04-05 03:02:20 -0700713 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700714 "../audio",
kjellander94cee312016-06-10 01:56:57 -0700715 "../call",
Mirko Bonadeia0e1a552017-12-04 10:50:51 +0100716 "../call:call_interfaces",
Artem Titov4e199e92018-08-20 13:30:39 +0200717 "../call:fake_network",
Yves Gerey3e707812018-11-28 16:47:49 +0100718 "../call:rtp_interfaces",
sprangdb2a9fc2017-08-09 06:42:32 -0700719 "../call:rtp_sender",
Artem Titov4e199e92018-08-20 13:30:39 +0200720 "../call:simulated_network",
Artem Titov46c4e602018-08-17 14:26:54 +0200721 "../call:simulated_packet_receiver",
aleloi440b6d92017-08-22 05:43:23 -0700722 "../call:video_stream_api",
mbonadei3edccb92017-06-01 04:47:20 -0700723 "../logging:rtc_event_log_api",
Qingsi Wang970b0882018-02-01 11:04:46 -0800724 "../logging:rtc_event_log_impl_base",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800725 "../media:rtc_internal_video_codecs",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100726 "../media:rtc_media_base",
Artem Titov3faa8322018-03-07 14:44:00 +0100727 "../modules/audio_device",
Paulina Hensman7bd79a02018-03-15 12:44:12 +0100728 "../modules/audio_device:audio_device_impl",
mbonadei3edccb92017-06-01 04:47:20 -0700729 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800730 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800731 "../modules/audio_processing",
mbonadei3edccb92017-06-01 04:47:20 -0700732 "../modules/rtp_rtcp",
733 "../modules/rtp_rtcp:mock_rtp_rtcp",
Mirko Bonadeib5728d92017-12-06 07:51:33 +0100734 "../modules/rtp_rtcp:rtp_rtcp_format",
Yves Gerey3e707812018-11-28 16:47:49 +0100735 "../modules/rtp_rtcp:rtp_video_header",
736 "../modules/video_coding:codec_globals_headers",
charujaincb728ea2017-09-18 03:08:08 -0700737 "../modules/video_coding:video_coding_utility",
mbonadei3edccb92017-06-01 04:47:20 -0700738 "../modules/video_coding:webrtc_h264",
Emircan Uysaler03e6ec92018-03-09 15:03:26 -0800739 "../modules/video_coding:webrtc_multiplex",
Sergio Garcia Murillo43800f92018-06-21 16:16:38 +0200740 "../modules/video_coding:webrtc_vp8",
mbonadei3edccb92017-06-01 04:47:20 -0700741 "../modules/video_coding:webrtc_vp9",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100742 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700743 "../rtc_base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -0700744 "../system_wrappers",
Mirko Bonadei17f48782018-09-28 08:51:10 +0200745 "../system_wrappers:field_trial",
kjellander94cee312016-06-10 01:56:57 -0700746 "../video",
kjellander0f380d82016-06-01 04:48:26 -0700747 "//testing/gtest",
Karl Wiberg918f50c2018-07-05 11:40:33 +0200748 "//third_party/abseil-cpp/absl/memory",
Elad Alond8d32482019-02-18 23:45:57 +0100749 "//third_party/abseil-cpp/absl/types:optional",
kjellander0f380d82016-06-01 04:48:26 -0700750 ]
mbonadei148d5a22017-04-28 05:24:50 -0700751 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700752 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
753 }
kjellander0f380d82016-06-01 04:48:26 -0700754}
755
ehmaldonado38a21322016-09-02 04:10:34 -0700756rtc_source_set("test_renderer") {
mbonadei9c296b32017-09-05 05:11:41 -0700757 public_deps = [
758 ":test_renderer_generic",
759 ]
kjellander0f380d82016-06-01 04:48:26 -0700760 testonly = true
mbonadeicd95a4e2017-08-23 23:55:54 -0700761 if (is_mac) {
mbonadei9c296b32017-09-05 05:11:41 -0700762 public_deps += [ ":test_renderer_objc" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700763 }
764}
765
766if (is_mac) {
767 rtc_source_set("test_renderer_objc") {
768 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700769 visibility = [ ":test_renderer" ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700770 sources = [
771 "mac/video_renderer_mac.h",
772 "mac/video_renderer_mac.mm",
773 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700774 deps = [
mbonadei9c296b32017-09-05 05:11:41 -0700775 ":test_renderer_generic",
mbonadeicd95a4e2017-08-23 23:55:54 -0700776 "../rtc_base:rtc_base_approved",
777 ]
778 libs = [
779 "Cocoa.framework",
780 "OpenGL.framework",
781 "CoreVideo.framework",
782 ]
783 if (!build_with_chromium && is_clang) {
784 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
785 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
786 }
787 }
788}
789
790rtc_source_set("test_renderer_generic") {
791 testonly = true
mbonadei9c296b32017-09-05 05:11:41 -0700792 visibility = [
793 ":test_renderer",
794 ":test_renderer_objc",
795 ]
kjellander0f380d82016-06-01 04:48:26 -0700796 libs = []
797 sources = [
kjellander0f380d82016-06-01 04:48:26 -0700798 "video_renderer.cc",
799 "video_renderer.h",
800 "win/d3d_renderer.cc",
801 "win/d3d_renderer.h",
802 ]
mbonadeicd95a4e2017-08-23 23:55:54 -0700803 deps = [
804 ":test_support",
805 "..:webrtc_common",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100806 "../api:scoped_refptr",
Niels Möllerc6ce9c52018-05-11 11:15:30 +0200807 "../api/video:video_frame",
mbonadeicd95a4e2017-08-23 23:55:54 -0700808 "../common_video",
Mirko Bonadeiad627922017-11-30 17:16:21 +0100809 "../media:rtc_media_base",
Patrik Höglunda8005cf2017-12-13 16:05:42 +0100810 "../rtc_base:checks",
mbonadeicd95a4e2017-08-23 23:55:54 -0700811 "../rtc_base:rtc_base_approved",
812 "//testing/gtest",
813 ]
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100814 if (!(is_linux && rtc_use_x11) && !is_mac && !is_win) {
kjellander0f380d82016-06-01 04:48:26 -0700815 sources += [ "null_platform_renderer.cc" ]
816 }
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100817 if ((is_linux && rtc_use_x11) || is_mac) {
kjellander0f380d82016-06-01 04:48:26 -0700818 sources += [
819 "gl/gl_renderer.cc",
820 "gl/gl_renderer.h",
821 ]
822 }
823
Joachim Bauch75f18fc2017-12-20 21:25:47 +0100824 if (is_linux && rtc_use_x11) {
Edward Lemur84a87c42017-11-07 19:07:31 +0100825 sources += [
826 "linux/glx_renderer.cc",
827 "linux/glx_renderer.h",
828 "linux/video_renderer_linux.cc",
829 ]
kjellander0f380d82016-06-01 04:48:26 -0700830 libs += [
831 "Xext",
832 "X11",
833 "GL",
834 ]
835 }
836 if (is_android) {
837 libs += [
838 "GLESv2",
839 "log",
840 ]
841 }
kjellander0f380d82016-06-01 04:48:26 -0700842
kjellandere40a7ee2016-10-16 23:56:12 -0700843 if (!build_with_chromium && is_clang) {
844 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700845 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700846 }
kjellander0f380d82016-06-01 04:48:26 -0700847}
kwiberg37e99fd2017-04-10 05:15:48 -0700848
849rtc_source_set("audio_codec_mocks") {
850 testonly = true
851 sources = [
Niels Möller3f651d82018-12-19 15:06:17 +0100852 # TODO(nisse): Move these factories to their own target, to avoid
853 # unnecessary dependencies on gmock and gtest.
Niels Möllerb7180c02018-12-06 13:07:11 +0100854 "audio_decoder_proxy_factory.h",
Niels Möllera0f44302018-11-30 10:45:12 +0100855 "function_audio_decoder_factory.h",
kwiberg2b3aa142017-06-14 03:31:17 -0700856 "mock_audio_decoder.cc",
kwiberg37e99fd2017-04-10 05:15:48 -0700857 "mock_audio_decoder.h",
858 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700859 "mock_audio_encoder.cc",
860 "mock_audio_encoder.h",
861 "mock_audio_encoder_factory.h",
862 ]
863
864 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700865 ":test_support",
kwiberg529662a2017-09-04 05:43:17 -0700866 "../api:array_view",
Mirko Bonadeid9708072019-01-25 20:26:48 +0100867 "../api:scoped_refptr",
ossueb1fde42017-05-02 06:46:30 -0700868 "../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -0700869 "../api/audio_codecs:builtin_audio_decoder_factory",
Niels Möllera0f44302018-11-30 10:45:12 +0100870 "../rtc_base:checks",
ehmaldonadof6a861a2017-07-19 10:40:47 -0700871 "../rtc_base:rtc_base_approved",
Niels Möllera0f44302018-11-30 10:45:12 +0100872 "//third_party/abseil-cpp/absl/memory",
kwiberg37e99fd2017-04-10 05:15:48 -0700873 ]
874}
sakald7fdb802017-05-26 01:51:53 -0700875
Artem Titov66a29b92019-01-15 14:43:20 +0100876rtc_source_set("copy_to_file_audio_capturer") {
877 testonly = true
878 sources = [
879 "testsupport/copy_to_file_audio_capturer.cc",
880 "testsupport/copy_to_file_audio_capturer.h",
881 ]
882 deps = [
883 "../api:array_view",
884 "../common_audio:common_audio",
885 "../modules/audio_device:audio_device_impl",
886 "../rtc_base:rtc_base_approved",
887 "//third_party/abseil-cpp/absl/memory",
888 "//third_party/abseil-cpp/absl/types:optional",
889 ]
890}
891
892rtc_source_set("copy_to_file_audio_capturer_unittest") {
893 testonly = true
894 sources = [
895 "testsupport/copy_to_file_audio_capturer_unittest.cc",
896 ]
897 deps = [
898 ":copy_to_file_audio_capturer",
899 ":fileutils",
900 ":test_support",
901 "../modules/audio_device:audio_device_impl",
902 "//third_party/abseil-cpp/absl/memory",
903 ]
904}
905
sakald7fdb802017-05-26 01:51:53 -0700906if (!build_with_chromium && is_android) {
Mirko Bonadeifbb3b7d2017-11-07 15:36:33 +0000907 rtc_android_library("native_test_java") {
sakald7fdb802017-05-26 01:51:53 -0700908 testonly = true
909 java_files = [
910 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
911 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
912 ]
913 deps = [
jianjun.zhuc0247402017-07-11 06:20:45 -0700914 "../rtc_base:base_java",
sakald7fdb802017-05-26 01:51:53 -0700915 "//testing/android/native_test:native_test_java",
sakald7fdb802017-05-26 01:51:53 -0700916 ]
917 }
918}
Benjamin Wright8efafdf2019-01-11 10:48:42 -0800919
920rtc_source_set("call_config_utils") {
921 sources = [
922 "call_config_utils.cc",
923 "call_config_utils.h",
924 ]
925 deps = [
926 "../call:call_interfaces",
927 "../call:video_stream_api",
928 "../rtc_base:rtc_json",
929 ]
930}