1# Copyright (c) 2011 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
9{
10  'includes': [
11    '../build/common.gypi',
12    'audio_coding/codecs/cng/cng.gypi',
13    'audio_coding/codecs/g711/g711.gypi',
14    'audio_coding/codecs/g722/g722.gypi',
15    'audio_coding/codecs/ilbc/ilbc.gypi',
16    'audio_coding/codecs/isac/main/source/isac.gypi',
17    'audio_coding/codecs/isac/fix/source/isacfix.gypi',
18    'audio_coding/codecs/pcm16b/pcm16b.gypi',
19    'audio_coding/main/acm2/audio_coding_module.gypi',
20    'audio_coding/neteq/neteq.gypi',
21    'audio_conference_mixer/source/audio_conference_mixer.gypi',
22    'audio_device/audio_device.gypi',
23    'audio_processing/audio_processing.gypi',
24    'bitrate_controller/bitrate_controller.gypi',
25    'desktop_capture/desktop_capture.gypi',
26    'media_file/source/media_file.gypi',
27    'pacing/pacing.gypi',
28    'remote_bitrate_estimator/remote_bitrate_estimator.gypi',
29    'rtp_rtcp/source/rtp_rtcp.gypi',
30    'utility/source/utility.gypi',
31    'video_coding/codecs/i420/main/source/i420.gypi',
32    'video_coding/main/source/video_coding.gypi',
33    'video_capture/video_capture.gypi',
34    'video_processing/main/source/video_processing.gypi',
35    'video_render/video_render.gypi',
36  ],
37  'conditions': [
38    ['include_opus==1', {
39      'includes': ['audio_coding/codecs/opus/opus.gypi',],
40    }],
41    ['include_tests==1', {
42      'includes': [
43        'audio_coding/codecs/isac/isac_test.gypi',
44        'audio_coding/codecs/isac/isacfix_test.gypi',
45        'audio_coding/codecs/tools/audio_codec_speed_tests.gypi',
46        'audio_processing/audio_processing_tests.gypi',
47        'rtp_rtcp/test/testFec/test_fec.gypi',
48        'video_coding/main/source/video_coding_test.gypi',
49        'video_coding/codecs/test/video_codecs_test_framework.gypi',
50        'video_coding/codecs/test_framework/test_framework.gypi',
51        'video_coding/codecs/tools/video_codecs_tools.gypi',
52      ], # includes
53      'variables': {
54        'conditions': [
55          # Desktop capturer is supported only on Windows, OSX and Linux.
56          ['OS=="win" or OS=="mac" or OS=="linux"', {
57            'desktop_capture_supported%': 1,
58          }, {
59            'desktop_capture_supported%': 0,
60          }],
61        ],
62      },
63      'targets': [
64        {
65          'target_name': 'modules_unittests',
66          'type': '<(gtest_target_type)',
67          'defines': [
68            '<@(audio_coding_defines)',
69          ],
70          'dependencies': [
71            'acm_receive_test',
72            'acm_send_test',
73            'audio_coding_module',
74            'audio_processing',
75            'bitrate_controller',
76            'CNG',
77            'desktop_capture',
78            'iSACFix',
79            'media_file',
80            'neteq',
81            'neteq_test_tools',
82            'neteq_unittest_tools',
83            'paced_sender',
84            'PCM16B',  # Needed by NetEq tests.
85            'remote_bitrate_estimator',
86            'rtp_rtcp',
87            'test_framework',
88            'video_codecs_test_framework',
89            'video_processing',
90            'webrtc_utility',
91            'webrtc_video_coding',
92            '<@(neteq_dependencies)',
93            '<(rbe_components_path)/remote_bitrate_estimator_components.gyp:rbe_components',
94            '<(DEPTH)/testing/gmock.gyp:gmock',
95            '<(DEPTH)/testing/gtest.gyp:gtest',
96            '<(DEPTH)/third_party/gflags/gflags.gyp:gflags',
97            '<(webrtc_root)/common_audio/common_audio.gyp:common_audio',
98            '<(webrtc_root)/modules/video_coding/codecs/vp8/vp8.gyp:webrtc_vp8',
99            '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
100            '<(webrtc_root)/test/test.gyp:test_support_main',
101            '<(webrtc_root)/test/test.gyp:frame_generator',
102            '<(webrtc_root)/test/test.gyp:rtcp_packet_parser',
103          ],
104          'sources': [
105            'audio_coding/main/acm2/acm_opus_unittest.cc',
106            'audio_coding/main/acm2/acm_receiver_unittest.cc',
107            'audio_coding/main/acm2/acm_receiver_unittest_oldapi.cc',
108            'audio_coding/main/acm2/audio_coding_module_unittest.cc',
109            'audio_coding/main/acm2/audio_coding_module_unittest_oldapi.cc',
110            'audio_coding/main/acm2/call_statistics_unittest.cc',
111            'audio_coding/main/acm2/initial_delay_manager_unittest.cc',
112            'audio_coding/main/acm2/nack_unittest.cc',
113            'audio_coding/codecs/cng/cng_unittest.cc',
114            'audio_coding/codecs/isac/fix/source/filters_unittest.cc',
115            'audio_coding/codecs/isac/fix/source/filterbanks_unittest.cc',
116            'audio_coding/codecs/isac/fix/source/lpc_masking_model_unittest.cc',
117            'audio_coding/codecs/isac/fix/source/transform_unittest.cc',
118            'audio_coding/codecs/isac/main/source/isac_unittest.cc',
119            'audio_coding/codecs/opus/opus_unittest.cc',
120            'audio_coding/neteq/audio_classifier_unittest.cc',
121            'audio_coding/neteq/audio_multi_vector_unittest.cc',
122            'audio_coding/neteq/audio_vector_unittest.cc',
123            'audio_coding/neteq/background_noise_unittest.cc',
124            'audio_coding/neteq/buffer_level_filter_unittest.cc',
125            'audio_coding/neteq/comfort_noise_unittest.cc',
126            'audio_coding/neteq/decision_logic_unittest.cc',
127            'audio_coding/neteq/decoder_database_unittest.cc',
128            'audio_coding/neteq/delay_manager_unittest.cc',
129            'audio_coding/neteq/delay_peak_detector_unittest.cc',
130            'audio_coding/neteq/dsp_helper_unittest.cc',
131            'audio_coding/neteq/dtmf_buffer_unittest.cc',
132            'audio_coding/neteq/dtmf_tone_generator_unittest.cc',
133            'audio_coding/neteq/expand_unittest.cc',
134            'audio_coding/neteq/merge_unittest.cc',
135            'audio_coding/neteq/neteq_external_decoder_unittest.cc',
136            'audio_coding/neteq/neteq_impl_unittest.cc',
137            'audio_coding/neteq/neteq_stereo_unittest.cc',
138            'audio_coding/neteq/neteq_unittest.cc',
139            'audio_coding/neteq/normal_unittest.cc',
140            'audio_coding/neteq/packet_buffer_unittest.cc',
141            'audio_coding/neteq/payload_splitter_unittest.cc',
142            'audio_coding/neteq/post_decode_vad_unittest.cc',
143            'audio_coding/neteq/random_vector_unittest.cc',
144            'audio_coding/neteq/sync_buffer_unittest.cc',
145            'audio_coding/neteq/timestamp_scaler_unittest.cc',
146            'audio_coding/neteq/time_stretch_unittest.cc',
147            'audio_coding/neteq/mock/mock_audio_decoder.h',
148            'audio_coding/neteq/mock/mock_audio_vector.h',
149            'audio_coding/neteq/mock/mock_buffer_level_filter.h',
150            'audio_coding/neteq/mock/mock_decoder_database.h',
151            'audio_coding/neteq/mock/mock_delay_manager.h',
152            'audio_coding/neteq/mock/mock_delay_peak_detector.h',
153            'audio_coding/neteq/mock/mock_dtmf_buffer.h',
154            'audio_coding/neteq/mock/mock_dtmf_tone_generator.h',
155            'audio_coding/neteq/mock/mock_expand.h',
156            'audio_coding/neteq/mock/mock_external_decoder_pcm16b.h',
157            'audio_coding/neteq/mock/mock_packet_buffer.h',
158            'audio_coding/neteq/mock/mock_payload_splitter.h',
159            'audio_coding/neteq/tools/input_audio_file_unittest.cc',
160            'audio_coding/neteq/tools/packet_unittest.cc',
161            'audio_processing/aec/system_delay_unittest.cc',
162            'audio_processing/aec/echo_cancellation_unittest.cc',
163            'audio_processing/echo_cancellation_impl_unittest.cc',
164            'audio_processing/utility/delay_estimator_unittest.cc',
165            'audio_processing/utility/ring_buffer_unittest.cc',
166            'bitrate_controller/bitrate_controller_unittest.cc',
167            'desktop_capture/desktop_and_cursor_composer_unittest.cc',
168            'desktop_capture/desktop_region_unittest.cc',
169            'desktop_capture/differ_block_unittest.cc',
170            'desktop_capture/differ_unittest.cc',
171            'desktop_capture/mouse_cursor_monitor_unittest.cc',
172            'desktop_capture/screen_capturer_helper_unittest.cc',
173            'desktop_capture/screen_capturer_mac_unittest.cc',
174            'desktop_capture/screen_capturer_mock_objects.h',
175            'desktop_capture/screen_capturer_unittest.cc',
176            'desktop_capture/window_capturer_unittest.cc',
177            'desktop_capture/win/cursor_unittest.cc',
178            'desktop_capture/win/cursor_unittest_resources.h',
179            'desktop_capture/win/cursor_unittest_resources.rc',
180            'media_file/source/media_file_unittest.cc',
181            'module_common_types_unittest.cc',
182            'pacing/paced_sender_unittest.cc',
183            'remote_bitrate_estimator/bwe_simulations.cc',
184            'remote_bitrate_estimator/include/mock/mock_remote_bitrate_observer.h',
185            'remote_bitrate_estimator/rate_statistics_unittest.cc',
186            'remote_bitrate_estimator/remote_bitrate_estimator_single_stream_unittest.cc',
187            'remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.cc',
188            'remote_bitrate_estimator/remote_bitrate_estimator_unittest_helper.h',
189            'remote_bitrate_estimator/remote_bitrate_estimators_test.cc',
190            'remote_bitrate_estimator/test/bwe_test_baselinefile.cc',
191            'remote_bitrate_estimator/test/bwe_test_baselinefile.h',
192            'remote_bitrate_estimator/test/bwe_test_fileutils.cc',
193            'remote_bitrate_estimator/test/bwe_test_fileutils.h',
194            'remote_bitrate_estimator/test/bwe_test_framework.cc',
195            'remote_bitrate_estimator/test/bwe_test_framework.h',
196            'remote_bitrate_estimator/test/bwe_test_framework_unittest.cc',
197            'remote_bitrate_estimator/test/bwe_test_logging.cc',
198            'remote_bitrate_estimator/test/bwe_test_logging.h',
199            'remote_bitrate_estimator/test/bwe_test.cc',
200            'remote_bitrate_estimator/test/bwe_test.h',
201            'rtp_rtcp/source/mock/mock_rtp_payload_strategy.h',
202            'rtp_rtcp/source/byte_io_unittest.cc',
203            'rtp_rtcp/source/fec_receiver_unittest.cc',
204            'rtp_rtcp/source/fec_test_helper.cc',
205            'rtp_rtcp/source/fec_test_helper.h',
206            'rtp_rtcp/source/nack_rtx_unittest.cc',
207            'rtp_rtcp/source/producer_fec_unittest.cc',
208            'rtp_rtcp/source/receive_statistics_unittest.cc',
209            'rtp_rtcp/source/remote_ntp_time_estimator_unittest.cc',
210            'rtp_rtcp/source/rtcp_format_remb_unittest.cc',
211            'rtp_rtcp/source/rtcp_packet_unittest.cc',
212            'rtp_rtcp/source/rtcp_receiver_unittest.cc',
213            'rtp_rtcp/source/rtcp_sender_unittest.cc',
214            'rtp_rtcp/source/rtp_fec_unittest.cc',
215            'rtp_rtcp/source/rtp_format_h264_unittest.cc',
216            'rtp_rtcp/source/rtp_format_vp8_unittest.cc',
217            'rtp_rtcp/source/rtp_format_vp8_test_helper.cc',
218            'rtp_rtcp/source/rtp_format_vp8_test_helper.h',
219            'rtp_rtcp/source/rtp_packet_history_unittest.cc',
220            'rtp_rtcp/source/rtp_payload_registry_unittest.cc',
221            'rtp_rtcp/source/rtp_rtcp_impl_unittest.cc',
222            'rtp_rtcp/source/rtp_header_extension_unittest.cc',
223            'rtp_rtcp/source/rtp_sender_unittest.cc',
224            'rtp_rtcp/source/vp8_partition_aggregator_unittest.cc',
225            'rtp_rtcp/test/testAPI/test_api.cc',
226            'rtp_rtcp/test/testAPI/test_api.h',
227            'rtp_rtcp/test/testAPI/test_api_audio.cc',
228            'rtp_rtcp/test/testAPI/test_api_rtcp.cc',
229            'rtp_rtcp/test/testAPI/test_api_video.cc',
230            'utility/source/audio_frame_operations_unittest.cc',
231            'utility/source/file_player_unittests.cc',
232            'video_coding/codecs/test/packet_manipulator_unittest.cc',
233            'video_coding/codecs/test/stats_unittest.cc',
234            'video_coding/codecs/test/videoprocessor_unittest.cc',
235            'video_coding/codecs/vp8/default_temporal_layers_unittest.cc',
236            'video_coding/codecs/vp8/reference_picture_selection_unittest.cc',
237            'video_coding/main/interface/mock/mock_vcm_callbacks.h',
238            'video_coding/main/source/decoding_state_unittest.cc',
239            'video_coding/main/source/jitter_buffer_unittest.cc',
240            'video_coding/main/source/jitter_estimator_tests.cc',
241            'video_coding/main/source/media_optimization_unittest.cc',
242            'video_coding/main/source/receiver_unittest.cc',
243            'video_coding/main/source/session_info_unittest.cc',
244            'video_coding/main/source/timing_unittest.cc',
245            'video_coding/main/source/video_coding_robustness_unittest.cc',
246            'video_coding/main/source/video_receiver_unittest.cc',
247            'video_coding/main/source/video_sender_unittest.cc',
248            'video_coding/main/source/qm_select_unittest.cc',
249            'video_coding/main/source/test/stream_generator.cc',
250            'video_coding/main/source/test/stream_generator.h',
251            'video_coding/utility/quality_scaler_unittest.cc',
252            'video_processing/main/test/unit_test/brightness_detection_test.cc',
253            'video_processing/main/test/unit_test/color_enhancement_test.cc',
254            'video_processing/main/test/unit_test/content_metrics_test.cc',
255            'video_processing/main/test/unit_test/deflickering_test.cc',
256            'video_processing/main/test/unit_test/video_processing_unittest.cc',
257            'video_processing/main/test/unit_test/video_processing_unittest.h',
258          ],
259          'conditions': [
260            ['enable_bwe_test_logging==1', {
261              'defines': [ 'BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=1' ],
262            }, {
263              'defines': [ 'BWE_TEST_LOGGING_COMPILE_TIME_ENABLE=0' ],
264              'sources!': [
265                'remote_bitrate_estimator/test/bwe_test_logging.cc'
266              ],
267            }],
268            # Run screen/window capturer tests only on platforms where they are
269            # supported.
270            ['desktop_capture_supported==0', {
271              'sources!': [
272                'desktop_capture/desktop_and_cursor_composer_unittest.cc',
273                'desktop_capture/mouse_cursor_monitor_unittest.cc',
274                'desktop_capture/screen_capturer_helper_unittest.cc',
275                'desktop_capture/screen_capturer_mac_unittest.cc',
276                'desktop_capture/screen_capturer_mock_objects.h',
277                'desktop_capture/screen_capturer_unittest.cc',
278                'desktop_capture/window_capturer_unittest.cc',
279              ],
280            }],
281            ['prefer_fixed_point==1', {
282              'defines': [ 'WEBRTC_AUDIOPROC_FIXED_PROFILE' ],
283            }, {
284              'defines': [ 'WEBRTC_AUDIOPROC_FLOAT_PROFILE' ],
285            }],
286            ['enable_protobuf==1', {
287              'defines': [ 'WEBRTC_AUDIOPROC_DEBUG_DUMP' ],
288              'dependencies': [
289                'audioproc_unittest_proto',
290              ],
291              'sources': [
292                'audio_processing/audio_processing_impl_unittest.cc',
293                'audio_processing/test/audio_processing_unittest.cc',
294                'audio_processing/test/test_utils.h',
295              ],
296            }],
297            ['build_libvpx==1', {
298              'dependencies': [
299                '<(DEPTH)/third_party/libvpx/libvpx.gyp:libvpx',
300              ],
301            }],
302            ['OS=="android"', {
303              'dependencies': [
304                '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
305              ],
306            }],
307          ],
308          # Disable warnings to enable Win64 build, issue 1323.
309          'msvs_disabled_warnings': [
310            4267,  # size_t to int truncation.
311          ],
312        },
313        {
314          'target_name': 'modules_tests',
315          'type': '<(gtest_target_type)',
316          'dependencies': [
317            'audio_coding_module',
318            'rtp_rtcp',
319            'test_framework',
320            'video_codecs_test_framework',
321            'webrtc_utility',
322            'webrtc_video_coding',
323            '<(DEPTH)/testing/gtest.gyp:gtest',
324            '<(webrtc_root)/common_video/common_video.gyp:common_video',
325            '<(webrtc_root)/modules/video_coding/codecs/vp8/vp8.gyp:webrtc_vp8',
326            '<(webrtc_root)/system_wrappers/source/system_wrappers.gyp:system_wrappers',
327            '<(webrtc_root)/test/metrics.gyp:metrics',
328            '<(webrtc_root)/test/test.gyp:test_support',
329            '<(webrtc_root)/test/test.gyp:test_support_main',
330          ],
331          'defines': [
332            '<@(audio_coding_defines)',
333          ],
334          'sources': [
335            'audio_coding/main/test/APITest.cc',
336            'audio_coding/main/test/Channel.cc',
337            'audio_coding/main/test/dual_stream_unittest.cc',
338            'audio_coding/main/test/EncodeDecodeTest.cc',
339            'audio_coding/main/test/iSACTest.cc',
340            'audio_coding/main/test/opus_test.cc',
341            'audio_coding/main/test/PacketLossTest.cc',
342            'audio_coding/main/test/PCMFile.cc',
343            'audio_coding/main/test/RTPFile.cc',
344            'audio_coding/main/test/SpatialAudio.cc',
345            'audio_coding/main/test/TestAllCodecs.cc',
346            'audio_coding/main/test/target_delay_unittest.cc',
347            'audio_coding/main/test/Tester.cc',
348            'audio_coding/main/test/TestRedFec.cc',
349            'audio_coding/main/test/TestStereo.cc',
350            'audio_coding/main/test/TestVADDTX.cc',
351            'audio_coding/main/test/TimedTrace.cc',
352            'audio_coding/main/test/TwoWayCommunication.cc',
353            'audio_coding/main/test/initial_delay_unittest.cc',
354            'audio_coding/main/test/utility.cc',
355            'rtp_rtcp/test/testFec/test_fec.cc',
356            'video_coding/codecs/test/videoprocessor_integrationtest.cc',
357            'video_coding/codecs/vp8/test/vp8_impl_unittest.cc',
358          ],
359          'conditions': [
360            ['OS=="android"', {
361              'dependencies': [
362                '<(DEPTH)/testing/android/native_test.gyp:native_test_native_code',
363              ],
364            }],
365          ],
366        },
367      ],
368      'conditions': [
369        ['OS=="android"', {
370          'targets': [
371            {
372              'target_name': 'modules_unittests_apk_target',
373              'type': 'none',
374              'dependencies': [
375                '<(apk_tests_path):modules_unittests_apk',
376              ],
377            },
378            {
379              'target_name': 'modules_tests_apk_target',
380              'type': 'none',
381              'dependencies': [
382                '<(apk_tests_path):modules_tests_apk',
383              ],
384            },
385          ],
386        }],
387        ['test_isolation_mode != "noop"', {
388          'targets': [
389            {
390              'target_name': 'modules_tests_run',
391              'type': 'none',
392              'dependencies': [
393                'modules_tests',
394              ],
395              'includes': [
396                '../build/isolate.gypi',
397                'modules_tests.isolate',
398              ],
399              'sources': [
400                'modules_tests.isolate',
401              ],
402            },
403            {
404              'target_name': 'modules_unittests_run',
405              'type': 'none',
406              'dependencies': [
407                'modules_unittests',
408              ],
409              'includes': [
410                '../build/isolate.gypi',
411                'modules_unittests.isolate',
412              ],
413              'sources': [
414                'modules_unittests.isolate',
415              ],
416            },
417          ],
418        }],
419      ],
420    }], # include_tests
421  ], # conditions
422}
423