blob: 7426a6839f4d298b78ca5dc0d1cbec6647198fdd [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
mbonadei9aa3f0a2017-01-24 06:58:22 -08009import("../webrtc.gni")
kjellander0f380d82016-06-01 04:48:26 -070010import("//build/config/ui.gni")
kjellander0f380d82016-06-01 04:48:26 -070011if (is_android) {
12 import("//build/config/android/rules.gni")
13}
ehmaldonadoed8c8ed2016-11-23 12:58:35 -080014if (rtc_use_memcheck) {
Henrik Kjellander90fd7d82017-05-09 08:30:10 +020015 import("//tools_webrtc/valgrind/valgrind-webrtc.gni")
ehmaldonadoed8c8ed2016-11-23 12:58:35 -080016}
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000017
kjellanderb62dbbe2016-09-23 00:38:52 -070018group("test") {
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000019 testonly = true
20
21 deps = [
22 ":field_trial",
kjellander0f380d82016-06-01 04:48:26 -070023 ":rtp_test_utils",
24 ":test_common",
25 ":test_renderer",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000026 ":test_support",
kjellander0f380d82016-06-01 04:48:26 -070027 ":video_test_common",
28 ]
mbonadei148d5a22017-04-28 05:24:50 -070029
30 if (!build_with_chromium) {
31 deps += [
32 ":test_main",
33 ":test_support_unittests",
34 ]
35 }
kjellander0f380d82016-06-01 04:48:26 -070036}
37
ehmaldonado38a21322016-09-02 04:10:34 -070038rtc_source_set("video_test_common") {
kjellander0f380d82016-06-01 04:48:26 -070039 testonly = true
40 sources = [
41 "fake_texture_frame.cc",
42 "fake_texture_frame.h",
43 "frame_generator.cc",
44 "frame_generator.h",
ehmaldonado656610f2017-02-06 02:21:11 -080045 "frame_generator_capturer.cc",
46 "frame_generator_capturer.h",
kjellander0f380d82016-06-01 04:48:26 -070047 "frame_utils.cc",
48 "frame_utils.h",
ehmaldonado656610f2017-02-06 02:21:11 -080049 "vcm_capturer.cc",
50 "vcm_capturer.h",
sprangc5d62e22017-04-02 23:53:04 -070051 "video_capturer.cc",
ehmaldonado656610f2017-02-06 02:21:11 -080052 "video_capturer.h",
kjellander0f380d82016-06-01 04:48:26 -070053 ]
54
kjellandere40a7ee2016-10-16 23:56:12 -070055 if (!build_with_chromium && is_clang) {
56 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070057 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070058 }
59
60 deps = [
mbonadei3edccb92017-06-01 04:47:20 -070061 "..:video_stream_api",
62 "..:webrtc_common",
63 "../base:rtc_base_approved",
64 "../base:rtc_task_queue",
kjellander0f380d82016-06-01 04:48:26 -070065 "../common_video",
sprangc5d62e22017-04-02 23:53:04 -070066 "../media:rtc_media_base",
ehmaldonado656610f2017-02-06 02:21:11 -080067 "../modules/video_capture:video_capture_module",
mbonadei3edccb92017-06-01 04:47:20 -070068 "../system_wrappers",
kjellander0f380d82016-06-01 04:48:26 -070069 ]
70}
71
ehmaldonado38a21322016-09-02 04:10:34 -070072rtc_source_set("rtp_test_utils") {
kjellander0f380d82016-06-01 04:48:26 -070073 testonly = true
74 sources = [
75 "rtcp_packet_parser.cc",
76 "rtcp_packet_parser.h",
77 "rtp_file_reader.cc",
78 "rtp_file_reader.h",
79 "rtp_file_writer.cc",
80 "rtp_file_writer.h",
81 ]
82
kjellandere40a7ee2016-10-16 23:56:12 -070083 if (!build_with_chromium && is_clang) {
84 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070085 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -070086 }
87
88 deps = [
89 "..:webrtc_common",
mbonadei3edccb92017-06-01 04:47:20 -070090 "../base:rtc_base_approved",
kjellander0f380d82016-06-01 04:48:26 -070091 "../modules/rtp_rtcp",
92 "//testing/gtest",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000093 ]
94}
95
ehmaldonado38a21322016-09-02 04:10:34 -070096rtc_source_set("field_trial") {
kjellander0f380d82016-06-01 04:48:26 -070097 testonly = true
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +000098 sources = [
99 "field_trial.cc",
100 "field_trial.h",
101 ]
102
103 deps = [
kwiberg@webrtc.orgac2d27d2015-02-26 13:59:22 +0000104 "..:webrtc_common",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000105 "../system_wrappers",
phoglund37ebcf02016-01-08 05:04:57 -0800106 "../system_wrappers:field_trial_default",
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000107 ]
kjellander@webrtc.orgb8caf6a2014-09-30 18:05:02 +0000108}
109
mbonadei148d5a22017-04-28 05:24:50 -0700110rtc_source_set("test_support") {
111 testonly = true
kjellander32c4a202016-08-30 02:53:49 -0700112
mbonadei148d5a22017-04-28 05:24:50 -0700113 sources = [
114 "gmock.h",
115 "gtest.h",
116 "testsupport/packet_reader.cc",
117 "testsupport/packet_reader.h",
118 "testsupport/perf_test.cc",
119 "testsupport/perf_test.h",
120 "testsupport/trace_to_stderr.cc",
121 "testsupport/trace_to_stderr.h",
122 "testsupport/unittest_utils.h",
123 ]
124
Kári Tristan Helgasone2baffb2017-06-09 10:31:58 +0200125 if (is_ios) {
126 sources += [
127 "ios/test_support.h",
128 "ios/test_support.mm",
129 ]
130 }
131
mbonadei148d5a22017-04-28 05:24:50 -0700132 deps = [
133 "..:webrtc_common",
134 "../base:gtest_prod",
135 "../base:rtc_base_approved",
136 "../common_video",
137 "../system_wrappers",
138 "//testing/gmock",
139 "//testing/gtest",
140 ]
141
142 public_deps = [
143 ":fileutils",
144 ]
145
146 if (!build_with_chromium && is_clang) {
147 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
148 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
149 }
150
151 if (is_android) {
152 deps += [ "//base:base" ]
153 }
154
155 if (is_ios && !build_with_chromium) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700156 deps += [ "../sdk:objc_common" ]
mbonadei148d5a22017-04-28 05:24:50 -0700157 }
158
159 if (rtc_use_memcheck) {
160 data = valgrind_webrtc_dependencies
kjellander32c4a202016-08-30 02:53:49 -0700161 }
162}
163
mbonadei9452c622017-04-27 12:29:29 -0700164if (!build_with_chromium) {
165 # This target depends on //third_party/gflags and since chromium does not
166 # have gflags it causes an error when Gn parses this BUILD.gn file.
167 # It seems that Gn eagerly tries to understand if all the targets are
168 # buildable (even deps). Obviously gflags is not buildable in chromium
169 # so if a target depends on this BUILD.gn file we hit this error.
170 rtc_source_set("test_main") {
171 testonly = true
172 sources = [
173 "test_main.cc",
174 ]
kjellander0f380d82016-06-01 04:48:26 -0700175
mbonadei9452c622017-04-27 12:29:29 -0700176 public_deps = [
177 ":test_support",
178 ]
179 deps = [
180 ":field_trial",
mbonadei3edccb92017-06-01 04:47:20 -0700181 "../base:rtc_base_approved",
mbonadei9452c622017-04-27 12:29:29 -0700182 "../system_wrappers:metrics_default",
183 "//testing/gmock",
184 "//testing/gtest",
185 "//third_party/gflags",
186 ]
kjellander0f380d82016-06-01 04:48:26 -0700187 }
188
mbonadei9452c622017-04-27 12:29:29 -0700189 rtc_source_set("video_test_support") {
190 testonly = true
191
192 sources = [
193 "testsupport/frame_reader.h",
194 "testsupport/frame_writer.h",
195 "testsupport/metrics/video_metrics.cc",
196 "testsupport/metrics/video_metrics.h",
197 "testsupport/mock/mock_frame_reader.h",
198 "testsupport/mock/mock_frame_writer.h",
199 "testsupport/y4m_frame_writer.cc",
200 "testsupport/yuv_frame_reader.cc",
201 "testsupport/yuv_frame_writer.cc",
202 ]
203
204 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700205 ":test_support",
206 ":video_test_common",
207 "..:webrtc_common",
mbonadei9452c622017-04-27 12:29:29 -0700208 "../base:rtc_base_approved",
209 "../common_video",
210 "../system_wrappers",
211 "//testing/gmock",
212 "//testing/gtest",
213 "//third_party/gflags",
214 ]
215
216 public_deps = [
217 ":fileutils",
218 ]
219
220 if (!build_with_chromium && is_clang) {
221 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
222 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
223 }
224
225 if (is_android) {
226 deps += [ "//base:base" ]
227 }
228
229 if (is_ios) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700230 deps += [ "../sdk:objc_common" ]
mbonadei9452c622017-04-27 12:29:29 -0700231 }
232
233 if (rtc_use_memcheck) {
234 data = valgrind_webrtc_dependencies
235 }
kjellander0f380d82016-06-01 04:48:26 -0700236 }
237
mbonadei148d5a22017-04-28 05:24:50 -0700238 rtc_source_set("test_support_isolated_output") {
mbonadei9452c622017-04-27 12:29:29 -0700239 testonly = true
mbonadei9452c622017-04-27 12:29:29 -0700240 sources = [
mbonadei9452c622017-04-27 12:29:29 -0700241 "testsupport/isolated_output.cc",
242 "testsupport/isolated_output.h",
mbonadei9452c622017-04-27 12:29:29 -0700243 ]
mbonadei9452c622017-04-27 12:29:29 -0700244 deps = [
mbonadei148d5a22017-04-28 05:24:50 -0700245 ":fileutils",
mbonadei9452c622017-04-27 12:29:29 -0700246 "../base:rtc_base_approved",
mbonadei9452c622017-04-27 12:29:29 -0700247 "//third_party/gflags",
248 ]
mbonadei148d5a22017-04-28 05:24:50 -0700249 }
mbonadei9452c622017-04-27 12:29:29 -0700250
mbonadei148d5a22017-04-28 05:24:50 -0700251 test_support_unittests_resources = [
252 "//resources/foreman_cif_short.yuv",
253 "//resources/video_coding/frame-ethernet-ii.pcap",
254 "//resources/video_coding/frame-loopback.pcap",
255 "//resources/video_coding/pltype103.rtp",
256 "//resources/video_coding/pltype103_header_only.rtp",
257 "//resources/video_coding/ssrcs-2.pcap",
258 "//resources/video_coding/ssrcs-3.pcap",
259 ]
mbonadei9452c622017-04-27 12:29:29 -0700260
mbonadei148d5a22017-04-28 05:24:50 -0700261 if (is_ios) {
262 bundle_data("test_support_unittests_bundle_data") {
263 testonly = true
264 sources = test_support_unittests_resources
265 outputs = [
266 "{{bundle_resources_dir}}/{{source_file_part}}",
267 ]
mbonadei9452c622017-04-27 12:29:29 -0700268 }
kjellander28a0ffd2016-08-24 07:48:42 -0700269 }
kjellander0f380d82016-06-01 04:48:26 -0700270
mbonadei9452c622017-04-27 12:29:29 -0700271 rtc_test("test_support_unittests") {
mbonadei3edccb92017-06-01 04:47:20 -0700272 deps = [
273 ":fake_audio_device",
274 ":rtp_test_utils",
275 "../api:video_frame_api",
276 "../base:rtc_base_approved",
277 "../call:call_interfaces",
278 "../common_audio",
279 "../modules/rtp_rtcp",
280 "../system_wrappers",
281 ]
mbonadei9452c622017-04-27 12:29:29 -0700282 sources = [
283 "fake_audio_device_unittest.cc",
284 "fake_network_pipe_unittest.cc",
285 "frame_generator_unittest.cc",
286 "rtp_file_reader_unittest.cc",
287 "rtp_file_writer_unittest.cc",
288 "testsupport/always_passing_unittest.cc",
289 "testsupport/isolated_output_unittest.cc",
290 "testsupport/metrics/video_metrics_unittest.cc",
291 "testsupport/packet_reader_unittest.cc",
292 "testsupport/perf_test_unittest.cc",
293 "testsupport/y4m_frame_writer_unittest.cc",
294 "testsupport/yuv_frame_reader_unittest.cc",
295 "testsupport/yuv_frame_writer_unittest.cc",
296 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700297
mbonadei9452c622017-04-27 12:29:29 -0700298 # TODO(jschuh): Bug 1348: fix this warning.
299 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
300
301 if (is_win) {
302 # virtual override w/different const/volatile signature.
303 cflags = [ "/wd4373" ]
304 }
305
306 if (!build_with_chromium && is_clang) {
307 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
308 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
309 }
310
311 data = test_support_unittests_resources
312 if (is_android) {
313 deps += [ "//testing/android/native_test:native_test_support" ]
314 shard_timeout = 900
315 }
316
317 if (is_ios) {
318 deps += [ ":test_support_unittests_bundle_data" ]
319 }
320
321 deps += [
322 ":direct_transport",
323 ":fileutils_unittests",
324 ":test_common",
325 ":test_main",
mbonadei148d5a22017-04-28 05:24:50 -0700326 ":test_support_isolated_output",
mbonadei9452c622017-04-27 12:29:29 -0700327 ":video_test_common",
328 ":video_test_support",
329 "../modules/video_capture",
330 "//testing/gmock",
331 "//testing/gtest",
332 "//third_party/gflags",
333 ]
334 }
kjellander0f380d82016-06-01 04:48:26 -0700335}
mbonadei9452c622017-04-27 12:29:29 -0700336
337rtc_source_set("fileutils") {
338 testonly = true
339 sources = [
340 "testsupport/fileutils.cc",
341 "testsupport/fileutils.h",
342 ]
mbonadei3edccb92017-06-01 04:47:20 -0700343 deps = [
344 "..:webrtc_common",
345 "../base:rtc_base_approved",
346 ]
mbonadei9452c622017-04-27 12:29:29 -0700347 if (is_ios) {
348 sources += [ "testsupport/iosfileutils.mm" ]
mbonadei3edccb92017-06-01 04:47:20 -0700349 deps += [ "../sdk:objc_common" ]
350 }
351 if (is_win) {
352 deps += [ "../base:rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700353 }
354 visibility = [ ":*" ]
355}
356
357rtc_source_set("run_test") {
358 testonly = true
359 sources = [
360 "run_test.h",
361 ]
362 if (is_mac) {
363 sources += [ "mac/run_test.mm" ]
364 } else {
365 sources += [ "run_test.cc" ]
366 }
367}
368
ehmaldonado37535bf2016-12-05 06:42:45 -0800369rtc_source_set("fileutils_unittests") {
370 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700371 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800372 sources = [
373 "testsupport/fileutils_unittest.cc",
374 ]
375 deps = [
376 ":fileutils",
mbonadei3edccb92017-06-01 04:47:20 -0700377 ":test_support",
378 "../base:rtc_base_approved",
ehmaldonado37535bf2016-12-05 06:42:45 -0800379 "//testing/gmock",
380 "//testing/gtest",
381 ]
382}
kjellander0f380d82016-06-01 04:48:26 -0700383
perkj488c5dc2017-02-08 05:55:51 -0800384rtc_source_set("direct_transport") {
385 testonly = true
386 sources = [
387 "direct_transport.cc",
388 "direct_transport.h",
389 "fake_network_pipe.cc",
390 "fake_network_pipe.h",
391 ]
392 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 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700397 "..:webrtc_common",
perkj488c5dc2017-02-08 05:55:51 -0800398 "../api:transport_api",
399 "../base:rtc_base_approved",
400 "../call",
mbonadei3edccb92017-06-01 04:47:20 -0700401 "../modules/rtp_rtcp",
402 "../system_wrappers",
perkj488c5dc2017-02-08 05:55:51 -0800403 ]
404}
405
perkj16ccfdf2017-02-28 14:41:05 -0800406rtc_source_set("fake_audio_device") {
407 testonly = true
408 sources = [
409 "fake_audio_device.cc",
410 "fake_audio_device.h",
411 ]
412 if (!build_with_chromium && is_clang) {
413 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
414 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
415 }
416 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700417 "..:webrtc_common",
perkj16ccfdf2017-02-28 14:41:05 -0800418 "../base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -0700419 "../common_audio:common_audio",
mbonadeib80ef8c2017-04-24 13:05:47 -0700420 "../modules/audio_device:audio_device",
mbonadei3edccb92017-06-01 04:47:20 -0700421 "../system_wrappers:system_wrappers",
perkj16ccfdf2017-02-28 14:41:05 -0800422 ]
423}
424
ehmaldonado38a21322016-09-02 04:10:34 -0700425rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700426 testonly = true
427 sources = [
428 "call_test.cc",
429 "call_test.h",
430 "configurable_frame_size_encoder.cc",
431 "configurable_frame_size_encoder.h",
432 "constants.cc",
433 "constants.h",
kjellander0f380d82016-06-01 04:48:26 -0700434 "drifting_clock.cc",
435 "drifting_clock.h",
436 "encoder_settings.cc",
437 "encoder_settings.h",
kjellander0f380d82016-06-01 04:48:26 -0700438 "fake_decoder.cc",
439 "fake_decoder.h",
440 "fake_encoder.cc",
441 "fake_encoder.h",
sakal55d932b2016-09-30 06:19:08 -0700442 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700443 "layer_filtering_transport.cc",
444 "layer_filtering_transport.h",
445 "mock_transport.h",
446 "mock_voe_channel_proxy.h",
447 "mock_voice_engine.h",
448 "null_transport.cc",
449 "null_transport.h",
450 "rtp_rtcp_observer.h",
451 "statistics.cc",
452 "statistics.h",
kjellander0f380d82016-06-01 04:48:26 -0700453 "win/run_loop_win.cc",
454 ]
455 if (!is_win) {
456 sources += [
457 "run_loop.cc",
458 "run_loop.h",
459 ]
460 }
461
kjellandere40a7ee2016-10-16 23:56:12 -0700462 if (!build_with_chromium && is_clang) {
463 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700464 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700465 }
466
467 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800468 ":direct_transport",
perkj16ccfdf2017-02-28 14:41:05 -0800469 ":fake_audio_device",
kjellander0f380d82016-06-01 04:48:26 -0700470 ":rtp_test_utils",
471 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800472 ":video_test_common",
mbonadei3edccb92017-06-01 04:47:20 -0700473 "..:video_stream_api",
kjellander0f380d82016-06-01 04:48:26 -0700474 "..:webrtc_common",
mbonadei3edccb92017-06-01 04:47:20 -0700475 "../api:transport_api",
476 "../api:video_frame_api",
477 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700478 "../api/audio_codecs:builtin_audio_encoder_factory",
ilnikd60d06a2017-04-05 03:02:20 -0700479 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700480 "../audio",
kjellander0f380d82016-06-01 04:48:26 -0700481 "../base:rtc_base_approved",
mbonadei3edccb92017-06-01 04:47:20 -0700482 "../base:rtc_task_queue",
kjellander94cee312016-06-10 01:56:57 -0700483 "../call",
mbonadei3edccb92017-06-01 04:47:20 -0700484 "../common_video",
485 "../logging:rtc_event_log_api",
486 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800487 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800488 "../modules/audio_processing",
mbonadei3edccb92017-06-01 04:47:20 -0700489 "../modules/rtp_rtcp",
490 "../modules/rtp_rtcp:mock_rtp_rtcp",
491 "../modules/video_coding:webrtc_h264",
492 "../modules/video_coding:webrtc_vp8",
493 "../modules/video_coding:webrtc_vp9",
494 "../system_wrappers",
kjellander94cee312016-06-10 01:56:57 -0700495 "../video",
mbonadei3edccb92017-06-01 04:47:20 -0700496 "../voice_engine",
kjellander0f380d82016-06-01 04:48:26 -0700497 "//testing/gmock",
498 "//testing/gtest",
kjellander0f380d82016-06-01 04:48:26 -0700499 ]
mbonadei148d5a22017-04-28 05:24:50 -0700500 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700501 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
502 }
kjellander0f380d82016-06-01 04:48:26 -0700503}
504
505config("test_renderer_exported_config") {
506 if (is_win && is_clang) {
507 # GN orders flags on a target before flags from configs. The default config
508 # adds -Wall, and this flag have to be after -Wall -- so they need to
509 # come from a config and cannot be on the target directly.
ehmaldonado4bc4d272016-08-25 04:15:40 -0700510 cflags = [
kjellander0f380d82016-06-01 04:48:26 -0700511 "-Wno-bool-conversion",
512 "-Wno-comment",
513 "-Wno-delete-non-virtual-dtor",
514 ]
515 }
516}
517
ehmaldonado38a21322016-09-02 04:10:34 -0700518rtc_source_set("test_renderer") {
kjellander0f380d82016-06-01 04:48:26 -0700519 testonly = true
520 libs = []
521 sources = [
522 "linux/glx_renderer.cc",
523 "linux/glx_renderer.h",
524 "linux/video_renderer_linux.cc",
525 "mac/video_renderer_mac.h",
526 "mac/video_renderer_mac.mm",
527 "video_renderer.cc",
528 "video_renderer.h",
529 "win/d3d_renderer.cc",
530 "win/d3d_renderer.h",
531 ]
532 if (!is_linux && !is_mac && !is_win) {
533 sources += [ "null_platform_renderer.cc" ]
534 }
535 if (is_linux || is_mac) {
536 sources += [
537 "gl/gl_renderer.cc",
538 "gl/gl_renderer.h",
539 ]
540 }
541
542 if (is_linux) {
543 libs += [
544 "Xext",
545 "X11",
546 "GL",
547 ]
548 }
549 if (is_android) {
550 libs += [
551 "GLESv2",
552 "log",
553 ]
554 }
555 if (is_mac) {
556 libs = [
557 "Cocoa.framework",
558 "OpenGL.framework",
559 "CoreVideo.framework",
560 ]
561 }
562
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700563 public_configs = [ ":test_renderer_exported_config" ]
kjellander0f380d82016-06-01 04:48:26 -0700564
kjellandere40a7ee2016-10-16 23:56:12 -0700565 if (!build_with_chromium && is_clang) {
566 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700567 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700568 }
569
570 deps = [
571 ":test_support",
mbonadei3edccb92017-06-01 04:47:20 -0700572 "..:webrtc_common",
573 "../base:rtc_base_approved",
574 "../common_video",
kjellander0f380d82016-06-01 04:48:26 -0700575 "../modules/media_file",
576 "//testing/gtest",
577 ]
578}
kwiberg37e99fd2017-04-10 05:15:48 -0700579
580rtc_source_set("audio_codec_mocks") {
581 testonly = true
582 sources = [
583 "mock_audio_decoder.h",
584 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700585 "mock_audio_encoder.cc",
586 "mock_audio_encoder.h",
587 "mock_audio_encoder_factory.h",
588 ]
589
590 deps = [
mbonadei3edccb92017-06-01 04:47:20 -0700591 ":test_support",
ossueb1fde42017-05-02 06:46:30 -0700592 "../api/audio_codecs:audio_codecs_api",
mbonadei3edccb92017-06-01 04:47:20 -0700593 "../api/audio_codecs:builtin_audio_decoder_factory",
594 "../base:rtc_base_approved",
ossueb1fde42017-05-02 06:46:30 -0700595 "//testing/gmock",
kwiberg37e99fd2017-04-10 05:15:48 -0700596 ]
597}
sakald7fdb802017-05-26 01:51:53 -0700598
599if (!build_with_chromium && is_android) {
600 android_library("native_test_java") {
601 testonly = true
602 java_files = [
603 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
604 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
605 ]
606 deps = [
607 "//testing/android/native_test:native_test_java",
608 "//webrtc/base:base_java",
609 ]
610 }
611}