blob: 9b42b25a38a783fcbb0366bcccbc2e70038eaf7f [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 = [
mbonadeidb5bb402017-06-01 04:07:12 -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",
mbonadeidb5bb402017-06-01 04:07:12 -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",
mbonadeidb5bb402017-06-01 04:07:12 -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
125 deps = [
126 "..:webrtc_common",
127 "../base:gtest_prod",
128 "../base:rtc_base_approved",
129 "../common_video",
130 "../system_wrappers",
131 "//testing/gmock",
132 "//testing/gtest",
133 ]
134
135 public_deps = [
136 ":fileutils",
137 ]
138
139 if (!build_with_chromium && is_clang) {
140 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
141 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
142 }
143
144 if (is_android) {
145 deps += [ "//base:base" ]
146 }
147
148 if (is_ios && !build_with_chromium) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700149 deps += [ "../sdk:objc_common" ]
mbonadei148d5a22017-04-28 05:24:50 -0700150 }
151
152 if (rtc_use_memcheck) {
153 data = valgrind_webrtc_dependencies
kjellander32c4a202016-08-30 02:53:49 -0700154 }
155}
156
mbonadei9452c622017-04-27 12:29:29 -0700157if (!build_with_chromium) {
158 # This target depends on //third_party/gflags and since chromium does not
159 # have gflags it causes an error when Gn parses this BUILD.gn file.
160 # It seems that Gn eagerly tries to understand if all the targets are
161 # buildable (even deps). Obviously gflags is not buildable in chromium
162 # so if a target depends on this BUILD.gn file we hit this error.
163 rtc_source_set("test_main") {
164 testonly = true
165 sources = [
166 "test_main.cc",
167 ]
kjellander0f380d82016-06-01 04:48:26 -0700168
mbonadei9452c622017-04-27 12:29:29 -0700169 public_deps = [
170 ":test_support",
171 ]
172 deps = [
173 ":field_trial",
mbonadeidb5bb402017-06-01 04:07:12 -0700174 "../base:rtc_base_approved",
mbonadei9452c622017-04-27 12:29:29 -0700175 "../system_wrappers:metrics_default",
176 "//testing/gmock",
177 "//testing/gtest",
178 "//third_party/gflags",
179 ]
kjellander0f380d82016-06-01 04:48:26 -0700180 }
181
mbonadei9452c622017-04-27 12:29:29 -0700182 rtc_source_set("video_test_support") {
183 testonly = true
184
185 sources = [
186 "testsupport/frame_reader.h",
187 "testsupport/frame_writer.h",
188 "testsupport/metrics/video_metrics.cc",
189 "testsupport/metrics/video_metrics.h",
190 "testsupport/mock/mock_frame_reader.h",
191 "testsupport/mock/mock_frame_writer.h",
192 "testsupport/y4m_frame_writer.cc",
193 "testsupport/yuv_frame_reader.cc",
194 "testsupport/yuv_frame_writer.cc",
195 ]
196
197 deps = [
mbonadeidb5bb402017-06-01 04:07:12 -0700198 ":test_support",
199 ":video_test_common",
200 "..:webrtc_common",
mbonadei9452c622017-04-27 12:29:29 -0700201 "../base:rtc_base_approved",
202 "../common_video",
203 "../system_wrappers",
204 "//testing/gmock",
205 "//testing/gtest",
206 "//third_party/gflags",
207 ]
208
209 public_deps = [
210 ":fileutils",
211 ]
212
213 if (!build_with_chromium && is_clang) {
214 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
215 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
216 }
217
218 if (is_android) {
219 deps += [ "//base:base" ]
220 }
221
222 if (is_ios) {
mbonadei2c8ac1b2017-05-31 05:14:26 -0700223 deps += [ "../sdk:objc_common" ]
mbonadei9452c622017-04-27 12:29:29 -0700224 }
225
226 if (rtc_use_memcheck) {
227 data = valgrind_webrtc_dependencies
228 }
kjellander0f380d82016-06-01 04:48:26 -0700229 }
230
mbonadei148d5a22017-04-28 05:24:50 -0700231 rtc_source_set("test_support_isolated_output") {
mbonadei9452c622017-04-27 12:29:29 -0700232 testonly = true
mbonadei9452c622017-04-27 12:29:29 -0700233 sources = [
mbonadei9452c622017-04-27 12:29:29 -0700234 "testsupport/isolated_output.cc",
235 "testsupport/isolated_output.h",
mbonadei9452c622017-04-27 12:29:29 -0700236 ]
mbonadei9452c622017-04-27 12:29:29 -0700237 deps = [
mbonadei148d5a22017-04-28 05:24:50 -0700238 ":fileutils",
mbonadei9452c622017-04-27 12:29:29 -0700239 "../base:rtc_base_approved",
mbonadei9452c622017-04-27 12:29:29 -0700240 "//third_party/gflags",
241 ]
mbonadei148d5a22017-04-28 05:24:50 -0700242 }
mbonadei9452c622017-04-27 12:29:29 -0700243
mbonadei148d5a22017-04-28 05:24:50 -0700244 test_support_unittests_resources = [
245 "//resources/foreman_cif_short.yuv",
246 "//resources/video_coding/frame-ethernet-ii.pcap",
247 "//resources/video_coding/frame-loopback.pcap",
248 "//resources/video_coding/pltype103.rtp",
249 "//resources/video_coding/pltype103_header_only.rtp",
250 "//resources/video_coding/ssrcs-2.pcap",
251 "//resources/video_coding/ssrcs-3.pcap",
252 ]
mbonadei9452c622017-04-27 12:29:29 -0700253
mbonadei148d5a22017-04-28 05:24:50 -0700254 if (is_ios) {
255 bundle_data("test_support_unittests_bundle_data") {
256 testonly = true
257 sources = test_support_unittests_resources
258 outputs = [
259 "{{bundle_resources_dir}}/{{source_file_part}}",
260 ]
mbonadei9452c622017-04-27 12:29:29 -0700261 }
kjellander28a0ffd2016-08-24 07:48:42 -0700262 }
kjellander0f380d82016-06-01 04:48:26 -0700263
mbonadei9452c622017-04-27 12:29:29 -0700264 rtc_test("test_support_unittests") {
mbonadeidb5bb402017-06-01 04:07:12 -0700265 deps = [
266 ":fake_audio_device",
267 ":rtp_test_utils",
268 "../api:video_frame_api",
269 "../base:rtc_base_approved",
270 "../call:call_interfaces",
271 "../common_audio",
272 "../modules/rtp_rtcp",
273 "../system_wrappers",
274 ]
mbonadei9452c622017-04-27 12:29:29 -0700275 sources = [
276 "fake_audio_device_unittest.cc",
277 "fake_network_pipe_unittest.cc",
278 "frame_generator_unittest.cc",
279 "rtp_file_reader_unittest.cc",
280 "rtp_file_writer_unittest.cc",
281 "testsupport/always_passing_unittest.cc",
282 "testsupport/isolated_output_unittest.cc",
283 "testsupport/metrics/video_metrics_unittest.cc",
284 "testsupport/packet_reader_unittest.cc",
285 "testsupport/perf_test_unittest.cc",
286 "testsupport/y4m_frame_writer_unittest.cc",
287 "testsupport/yuv_frame_reader_unittest.cc",
288 "testsupport/yuv_frame_writer_unittest.cc",
289 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700290
mbonadei9452c622017-04-27 12:29:29 -0700291 # TODO(jschuh): Bug 1348: fix this warning.
292 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
293
294 if (is_win) {
295 # virtual override w/different const/volatile signature.
296 cflags = [ "/wd4373" ]
297 }
298
299 if (!build_with_chromium && is_clang) {
300 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
301 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
302 }
303
304 data = test_support_unittests_resources
305 if (is_android) {
306 deps += [ "//testing/android/native_test:native_test_support" ]
307 shard_timeout = 900
308 }
309
310 if (is_ios) {
311 deps += [ ":test_support_unittests_bundle_data" ]
312 }
313
314 deps += [
315 ":direct_transport",
316 ":fileutils_unittests",
317 ":test_common",
318 ":test_main",
mbonadei148d5a22017-04-28 05:24:50 -0700319 ":test_support_isolated_output",
mbonadei9452c622017-04-27 12:29:29 -0700320 ":video_test_common",
321 ":video_test_support",
322 "../modules/video_capture",
323 "//testing/gmock",
324 "//testing/gtest",
325 "//third_party/gflags",
326 ]
327 }
kjellander0f380d82016-06-01 04:48:26 -0700328}
mbonadei9452c622017-04-27 12:29:29 -0700329
330rtc_source_set("fileutils") {
331 testonly = true
332 sources = [
333 "testsupport/fileutils.cc",
334 "testsupport/fileutils.h",
335 ]
mbonadeidb5bb402017-06-01 04:07:12 -0700336 deps = [
337 "..:webrtc_common",
338 "../base:rtc_base_approved",
339 ]
mbonadei9452c622017-04-27 12:29:29 -0700340 if (is_ios) {
341 sources += [ "testsupport/iosfileutils.mm" ]
mbonadeidb5bb402017-06-01 04:07:12 -0700342 deps += [ "../sdk:objc_common" ]
343 }
344 if (is_win) {
345 deps += [ "../base:rtc_base" ]
mbonadei9452c622017-04-27 12:29:29 -0700346 }
347 visibility = [ ":*" ]
348}
349
350rtc_source_set("run_test") {
351 testonly = true
352 sources = [
353 "run_test.h",
354 ]
355 if (is_mac) {
356 sources += [ "mac/run_test.mm" ]
357 } else {
358 sources += [ "run_test.cc" ]
359 }
360}
361
ehmaldonado37535bf2016-12-05 06:42:45 -0800362rtc_source_set("fileutils_unittests") {
363 testonly = true
kjellandere0629c02017-04-25 04:04:50 -0700364 visibility = [ ":*" ] # Only targets in this file can depend on this.
ehmaldonado37535bf2016-12-05 06:42:45 -0800365 sources = [
366 "testsupport/fileutils_unittest.cc",
367 ]
368 deps = [
369 ":fileutils",
mbonadeidb5bb402017-06-01 04:07:12 -0700370 ":test_support",
ehmaldonado37535bf2016-12-05 06:42:45 -0800371 "//testing/gmock",
372 "//testing/gtest",
373 ]
374}
kjellander0f380d82016-06-01 04:48:26 -0700375
perkj488c5dc2017-02-08 05:55:51 -0800376rtc_source_set("direct_transport") {
377 testonly = true
378 sources = [
379 "direct_transport.cc",
380 "direct_transport.h",
381 "fake_network_pipe.cc",
382 "fake_network_pipe.h",
383 ]
384 if (!build_with_chromium && is_clang) {
385 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
386 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
387 }
388 deps = [
mbonadeidb5bb402017-06-01 04:07:12 -0700389 "..:webrtc_common",
perkj488c5dc2017-02-08 05:55:51 -0800390 "../api:transport_api",
391 "../base:rtc_base_approved",
392 "../call",
mbonadeidb5bb402017-06-01 04:07:12 -0700393 "../modules/rtp_rtcp",
394 "../system_wrappers",
perkj488c5dc2017-02-08 05:55:51 -0800395 ]
396}
397
perkj16ccfdf2017-02-28 14:41:05 -0800398rtc_source_set("fake_audio_device") {
399 testonly = true
400 sources = [
401 "fake_audio_device.cc",
402 "fake_audio_device.h",
403 ]
404 if (!build_with_chromium && is_clang) {
405 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
406 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
407 }
408 deps = [
mbonadeidb5bb402017-06-01 04:07:12 -0700409 "..:webrtc_common",
perkj16ccfdf2017-02-28 14:41:05 -0800410 "../base:rtc_base_approved",
mbonadeidb5bb402017-06-01 04:07:12 -0700411 "../common_audio:common_audio",
mbonadeib80ef8c2017-04-24 13:05:47 -0700412 "../modules/audio_device:audio_device",
mbonadeidb5bb402017-06-01 04:07:12 -0700413 "../system_wrappers:system_wrappers",
perkj16ccfdf2017-02-28 14:41:05 -0800414 ]
415}
416
ehmaldonado38a21322016-09-02 04:10:34 -0700417rtc_source_set("test_common") {
kjellander0f380d82016-06-01 04:48:26 -0700418 testonly = true
419 sources = [
420 "call_test.cc",
421 "call_test.h",
422 "configurable_frame_size_encoder.cc",
423 "configurable_frame_size_encoder.h",
424 "constants.cc",
425 "constants.h",
kjellander0f380d82016-06-01 04:48:26 -0700426 "drifting_clock.cc",
427 "drifting_clock.h",
428 "encoder_settings.cc",
429 "encoder_settings.h",
kjellander0f380d82016-06-01 04:48:26 -0700430 "fake_decoder.cc",
431 "fake_decoder.h",
432 "fake_encoder.cc",
433 "fake_encoder.h",
sakal55d932b2016-09-30 06:19:08 -0700434 "fake_videorenderer.h",
kjellander0f380d82016-06-01 04:48:26 -0700435 "layer_filtering_transport.cc",
436 "layer_filtering_transport.h",
437 "mock_transport.h",
438 "mock_voe_channel_proxy.h",
439 "mock_voice_engine.h",
440 "null_transport.cc",
441 "null_transport.h",
442 "rtp_rtcp_observer.h",
443 "statistics.cc",
444 "statistics.h",
kjellander0f380d82016-06-01 04:48:26 -0700445 "win/run_loop_win.cc",
446 ]
447 if (!is_win) {
448 sources += [
449 "run_loop.cc",
450 "run_loop.h",
451 ]
452 }
453
kjellandere40a7ee2016-10-16 23:56:12 -0700454 if (!build_with_chromium && is_clang) {
455 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700456 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700457 }
458
459 deps = [
perkj488c5dc2017-02-08 05:55:51 -0800460 ":direct_transport",
perkj16ccfdf2017-02-28 14:41:05 -0800461 ":fake_audio_device",
kjellander0f380d82016-06-01 04:48:26 -0700462 ":rtp_test_utils",
463 ":test_support",
perkjc5726c12017-03-01 03:37:08 -0800464 ":video_test_common",
mbonadeidb5bb402017-06-01 04:07:12 -0700465 "..:video_stream_api",
kjellander0f380d82016-06-01 04:48:26 -0700466 "..:webrtc_common",
mbonadeidb5bb402017-06-01 04:07:12 -0700467 "../api:transport_api",
468 "../api:video_frame_api",
469 "../api/audio_codecs:builtin_audio_decoder_factory",
ossueb1fde42017-05-02 06:46:30 -0700470 "../api/audio_codecs:builtin_audio_encoder_factory",
ilnikd60d06a2017-04-05 03:02:20 -0700471 "../api/video_codecs:video_codecs_api",
kjellander94cee312016-06-10 01:56:57 -0700472 "../audio",
kjellander0f380d82016-06-01 04:48:26 -0700473 "../base:rtc_base_approved",
mbonadeidb5bb402017-06-01 04:07:12 -0700474 "../base:rtc_task_queue",
kjellander94cee312016-06-10 01:56:57 -0700475 "../call",
mbonadeidb5bb402017-06-01 04:07:12 -0700476 "../common_video",
477 "../logging:rtc_event_log_api",
478 "../modules/audio_device:mock_audio_device",
aleloi10111bc2016-11-17 06:48:48 -0800479 "../modules/audio_mixer:audio_mixer_impl",
aleloidd310712016-11-17 06:28:59 -0800480 "../modules/audio_processing",
mbonadeidb5bb402017-06-01 04:07:12 -0700481 "../modules/rtp_rtcp",
482 "../modules/rtp_rtcp:mock_rtp_rtcp",
483 "../modules/video_coding:webrtc_h264",
484 "../modules/video_coding:webrtc_vp8",
485 "../modules/video_coding:webrtc_vp9",
486 "../system_wrappers",
kjellander94cee312016-06-10 01:56:57 -0700487 "../video",
mbonadeidb5bb402017-06-01 04:07:12 -0700488 "../voice_engine",
kjellander0f380d82016-06-01 04:48:26 -0700489 "//testing/gmock",
490 "//testing/gtest",
kjellander0f380d82016-06-01 04:48:26 -0700491 ]
mbonadei148d5a22017-04-28 05:24:50 -0700492 if (!is_android && !build_with_chromium) {
oprypin92220ff2017-03-23 03:40:03 -0700493 deps += [ "../modules/video_capture:video_capture_internal_impl" ]
494 }
kjellander0f380d82016-06-01 04:48:26 -0700495}
496
497config("test_renderer_exported_config") {
498 if (is_win && is_clang) {
499 # GN orders flags on a target before flags from configs. The default config
500 # adds -Wall, and this flag have to be after -Wall -- so they need to
501 # come from a config and cannot be on the target directly.
ehmaldonado4bc4d272016-08-25 04:15:40 -0700502 cflags = [
kjellander0f380d82016-06-01 04:48:26 -0700503 "-Wno-bool-conversion",
504 "-Wno-comment",
505 "-Wno-delete-non-virtual-dtor",
506 ]
507 }
508}
509
ehmaldonado38a21322016-09-02 04:10:34 -0700510rtc_source_set("test_renderer") {
kjellander0f380d82016-06-01 04:48:26 -0700511 testonly = true
512 libs = []
513 sources = [
514 "linux/glx_renderer.cc",
515 "linux/glx_renderer.h",
516 "linux/video_renderer_linux.cc",
517 "mac/video_renderer_mac.h",
518 "mac/video_renderer_mac.mm",
519 "video_renderer.cc",
520 "video_renderer.h",
521 "win/d3d_renderer.cc",
522 "win/d3d_renderer.h",
523 ]
524 if (!is_linux && !is_mac && !is_win) {
525 sources += [ "null_platform_renderer.cc" ]
526 }
527 if (is_linux || is_mac) {
528 sources += [
529 "gl/gl_renderer.cc",
530 "gl/gl_renderer.h",
531 ]
532 }
533
534 if (is_linux) {
535 libs += [
536 "Xext",
537 "X11",
538 "GL",
539 ]
540 }
541 if (is_android) {
542 libs += [
543 "GLESv2",
544 "log",
545 ]
546 }
547 if (is_mac) {
548 libs = [
549 "Cocoa.framework",
550 "OpenGL.framework",
551 "CoreVideo.framework",
552 ]
553 }
554
ehmaldonadoe9cc6862016-09-05 06:10:18 -0700555 public_configs = [ ":test_renderer_exported_config" ]
kjellander0f380d82016-06-01 04:48:26 -0700556
kjellandere40a7ee2016-10-16 23:56:12 -0700557 if (!build_with_chromium && is_clang) {
558 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700559 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
kjellander0f380d82016-06-01 04:48:26 -0700560 }
561
562 deps = [
563 ":test_support",
mbonadeidb5bb402017-06-01 04:07:12 -0700564 "..:webrtc_common",
565 "../base:rtc_base_approved",
566 "../common_video",
kjellander0f380d82016-06-01 04:48:26 -0700567 "../modules/media_file",
568 "//testing/gtest",
569 ]
570}
kwiberg37e99fd2017-04-10 05:15:48 -0700571
572rtc_source_set("audio_codec_mocks") {
573 testonly = true
574 sources = [
575 "mock_audio_decoder.h",
576 "mock_audio_decoder_factory.h",
ossueb1fde42017-05-02 06:46:30 -0700577 "mock_audio_encoder.cc",
578 "mock_audio_encoder.h",
579 "mock_audio_encoder_factory.h",
580 ]
581
582 deps = [
mbonadeidb5bb402017-06-01 04:07:12 -0700583 ":test_support",
ossueb1fde42017-05-02 06:46:30 -0700584 "../api/audio_codecs:audio_codecs_api",
mbonadeidb5bb402017-06-01 04:07:12 -0700585 "../api/audio_codecs:builtin_audio_decoder_factory",
586 "../base:rtc_base_approved",
ossueb1fde42017-05-02 06:46:30 -0700587 "//testing/gmock",
kwiberg37e99fd2017-04-10 05:15:48 -0700588 ]
589}
sakald7fdb802017-05-26 01:51:53 -0700590
591if (!build_with_chromium && is_android) {
592 android_library("native_test_java") {
593 testonly = true
594 java_files = [
595 "android/org/webrtc/native_test/RTCNativeUnitTest.java",
596 "android/org/webrtc/native_test/RTCNativeUnitTestActivity.java",
597 ]
598 deps = [
599 "//testing/android/native_test:native_test_java",
600 "//webrtc/base:base_java",
601 ]
602 }
603}