blob: e44b35f4c3214b37d94eba5b1522bd5820ee0a48 [file] [log] [blame]
kjellanderfb114242016-06-13 00:19:48 -07001# Copyright (c) 2016 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")
kjellanderfb114242016-06-13 00:19:48 -070010import("audio_coding/audio_coding.gni")
kjellanderfb114242016-06-13 00:19:48 -070011
kjellanderfb114242016-06-13 00:19:48 -070012group("modules") {
kjellander705ecc52016-09-15 00:53:26 -070013 public_deps = [
kjellanderfb114242016-06-13 00:19:48 -070014 "audio_coding",
15 "audio_conference_mixer",
16 "audio_device",
kjellander6ceab082016-10-28 05:44:03 -070017 "audio_mixer",
kjellanderfb114242016-06-13 00:19:48 -070018 "audio_processing",
19 "bitrate_controller",
kjellander6ceab082016-10-28 05:44:03 -070020 "congestion_controller",
kjellanderfb114242016-06-13 00:19:48 -070021 "desktop_capture",
22 "media_file",
kjellander6ceab082016-10-28 05:44:03 -070023 "pacing",
24 "remote_bitrate_estimator",
kjellanderfb114242016-06-13 00:19:48 -070025 "rtp_rtcp",
26 "utility",
kjellander6ceab082016-10-28 05:44:03 -070027 "video_capture",
kjellanderfb114242016-06-13 00:19:48 -070028 "video_coding",
29 "video_processing",
30 ]
31}
32
33if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070034 modules_tests_resources = [
35 "//resources/audio_coding/testfile32kHz.pcm",
36 "//resources/audio_coding/teststereo32kHz.pcm",
37 "//resources/foreman_cif.yuv",
38 "//resources/paris_qcif.yuv",
39 ]
kjellander32c4a202016-08-30 02:53:49 -070040
41 if (is_ios) {
42 bundle_data("modules_tests_bundle_data") {
43 testonly = true
44 sources = modules_tests_resources
45 outputs = [
46 "{{bundle_resources_dir}}/{{source_file_part}}",
47 ]
48 }
49 }
50
ehmaldonado38a21322016-09-02 04:10:34 -070051 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070052 testonly = true
53
ehmaldonadof98dc102016-08-03 10:46:47 -070054 videoprocessor_defines = []
55 if (rtc_use_h264) {
56 videoprocessor_defines += [ "WEBRTC_VIDEOPROCESSOR_H264_TESTS" ]
57 }
58
59 defines = audio_coding_defines + videoprocessor_defines
60
61 deps = [
62 "..:webrtc_common",
63 "../common_video",
magjedceecea42016-11-28 07:20:21 -080064 "../media:rtc_media_base",
ehmaldonadof98dc102016-08-03 10:46:47 -070065 "../modules/audio_coding",
kwibergda2bf4e2016-10-24 13:47:09 -070066 "../modules/audio_coding:audio_format_conversion",
ehmaldonadof98dc102016-08-03 10:46:47 -070067 "../modules/rtp_rtcp",
68 "../modules/utility",
69 "../modules/video_coding",
70 "../modules/video_coding:video_codecs_test_framework",
71 "../system_wrappers",
ehmaldonado26bddb92016-11-30 06:12:01 -080072 "../test:test_main",
zijiehe6be0a652016-10-27 16:50:35 -070073 "//testing/gmock",
ehmaldonadof98dc102016-08-03 10:46:47 -070074 "//testing/gtest",
75 ]
76
77 sources = [
78 "audio_coding/test/APITest.cc",
79 "audio_coding/test/Channel.cc",
80 "audio_coding/test/EncodeDecodeTest.cc",
81 "audio_coding/test/PCMFile.cc",
82 "audio_coding/test/PacketLossTest.cc",
83 "audio_coding/test/RTPFile.cc",
84 "audio_coding/test/TestAllCodecs.cc",
85 "audio_coding/test/TestRedFec.cc",
86 "audio_coding/test/TestStereo.cc",
87 "audio_coding/test/TestVADDTX.cc",
88 "audio_coding/test/Tester.cc",
89 "audio_coding/test/TwoWayCommunication.cc",
90 "audio_coding/test/iSACTest.cc",
91 "audio_coding/test/opus_test.cc",
92 "audio_coding/test/target_delay_unittest.cc",
93 "audio_coding/test/utility.cc",
94 "rtp_rtcp/test/testFec/test_fec.cc",
95 "video_coding/codecs/test/videoprocessor_integrationtest.cc",
96 "video_coding/codecs/vp8/test/vp8_impl_unittest.cc",
97 ]
98
zijiehe6be0a652016-10-27 16:50:35 -070099 if (rtc_desktop_capture_supported) {
zijiehe372719b2016-11-11 17:18:34 -0800100 deps += [
101 "desktop_capture:desktop_capture_mock",
102 "desktop_capture:screen_drawer",
103 ]
zijiehe54fd5792016-11-02 14:49:35 -0700104 sources += [
105 "desktop_capture/screen_capturer_integration_test.cc",
106 "desktop_capture/screen_drawer_unittest.cc",
107 ]
zijiehe6be0a652016-10-27 16:50:35 -0700108 }
109
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700110 data = modules_tests_resources
111
ehmaldonadof98dc102016-08-03 10:46:47 -0700112 if (is_android) {
113 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700114 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -0700115 }
kjellander32c4a202016-08-30 02:53:49 -0700116
117 if (is_ios) {
118 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700119 }
120
kjellandere40a7ee2016-10-16 23:56:12 -0700121 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -0700122 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700123 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700124 }
125 if (is_win) {
126 cflags = [
127 # TODO(phoglund): get rid of 4373 supression when
128 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
129 # legacy warning for ignoring const / volatile in signatures.
130 "/wd4373",
131 ]
132 }
133 }
134
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700135 modules_unittests_resources = [
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700136 "//resources/att-downlink.rx",
137 "//resources/att-uplink.rx",
138 "//resources/audio_coding/neteq_opus.rtp",
139 "//resources/audio_coding/neteq_universal_new.rtp",
140 "//resources/audio_coding/speech_mono_16kHz.pcm",
141 "//resources/audio_coding/speech_mono_32_48kHz.pcm",
142 "//resources/audio_coding/testfile32kHz.pcm",
143 "//resources/audio_coding/teststereo32kHz.pcm",
144 "//resources/audio_device/audio_short16.pcm",
145 "//resources/audio_device/audio_short44.pcm",
146 "//resources/audio_device/audio_short48.pcm",
147 "//resources/audio_processing/agc/agc_audio.pcm",
148 "//resources/audio_processing/agc/agc_no_circular_buffer.dat",
149 "//resources/audio_processing/agc/agc_pitch_gain.dat",
150 "//resources/audio_processing/agc/agc_pitch_lag.dat",
151 "//resources/audio_processing/agc/agc_spectral_peak.dat",
152 "//resources/audio_processing/agc/agc_vad.dat",
153 "//resources/audio_processing/agc/agc_voicing_prob.dat",
154 "//resources/audio_processing/agc/agc_with_circular_buffer.dat",
ehmaldonadodedaf1c2016-11-18 04:52:22 -0800155 "//resources/audio_processing/output_data_fixed.pb",
156 "//resources/audio_processing/output_data_float.pb",
157 "//resources/audio_processing/output_data_mac.pb",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700158 "//resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
159 "//resources/audio_processing/transient/audio16kHz.pcm",
160 "//resources/audio_processing/transient/audio32kHz.pcm",
161 "//resources/audio_processing/transient/audio48kHz.pcm",
162 "//resources/audio_processing/transient/audio8kHz.pcm",
163 "//resources/audio_processing/transient/detect16kHz.dat",
164 "//resources/audio_processing/transient/detect32kHz.dat",
165 "//resources/audio_processing/transient/detect48kHz.dat",
166 "//resources/audio_processing/transient/detect8kHz.dat",
167 "//resources/audio_processing/transient/double-utils.dat",
168 "//resources/audio_processing/transient/float-utils.dat",
169 "//resources/audio_processing/transient/suppressed16kHz.pcm",
170 "//resources/audio_processing/transient/suppressed32kHz.pcm",
171 "//resources/audio_processing/transient/suppressed8kHz.pcm",
172 "//resources/audio_processing/transient/wpd0.dat",
173 "//resources/audio_processing/transient/wpd1.dat",
174 "//resources/audio_processing/transient/wpd2.dat",
175 "//resources/audio_processing/transient/wpd3.dat",
176 "//resources/audio_processing/transient/wpd4.dat",
177 "//resources/audio_processing/transient/wpd5.dat",
178 "//resources/audio_processing/transient/wpd6.dat",
179 "//resources/audio_processing/transient/wpd7.dat",
180 "//resources/deflicker_before_cif_short.yuv",
181 "//resources/far16_stereo.pcm",
182 "//resources/far32_stereo.pcm",
183 "//resources/far44_stereo.pcm",
184 "//resources/far48_stereo.pcm",
185 "//resources/far8_stereo.pcm",
186 "//resources/foremanColorEnhanced_cif_short.yuv",
187 "//resources/foreman_cif.yuv",
188 "//resources/foreman_cif_short.yuv",
189 "//resources/near16_stereo.pcm",
190 "//resources/near32_stereo.pcm",
191 "//resources/near44_stereo.pcm",
192 "//resources/near48_stereo.pcm",
193 "//resources/near8_stereo.pcm",
194 "//resources/ref03.aecdump",
195 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
196 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
197 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
198 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
199 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
200 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
201 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
202 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
203 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
204 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
205 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
206 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
207 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
208 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
209 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
210 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
211 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
212 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
213 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
214 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
215 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
216 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
217 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
218 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
219 "//resources/short_mixed_mono_48.dat",
220 "//resources/short_mixed_mono_48_arm.dat",
221 "//resources/short_mixed_mono_48.pcm",
222 "//resources/short_mixed_stereo_48.dat",
223 "//resources/short_mixed_stereo_48.pcm",
224 "//resources/sprint-downlink.rx",
225 "//resources/sprint-uplink.rx",
226 "//resources/synthetic-trace.rx",
227 "//resources/tmobile-downlink.rx",
228 "//resources/tmobile-uplink.rx",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700229 "//resources/verizon3g-downlink.rx",
230 "//resources/verizon3g-uplink.rx",
231 "//resources/verizon4g-downlink.rx",
232 "//resources/verizon4g-uplink.rx",
ehmaldonadod661e9c2016-11-22 10:42:59 -0800233 "//resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700234 ]
kjellander32c4a202016-08-30 02:53:49 -0700235
236 if (is_ios) {
237 bundle_data("modules_unittests_bundle_data") {
238 testonly = true
239 sources = modules_unittests_resources
240 outputs = [
241 "{{bundle_resources_dir}}/{{source_file_part}}",
242 ]
243 }
244 }
245
ehmaldonado36268652017-01-19 08:27:11 -0800246 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700247 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800248
249 deps = []
250 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700251 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800252 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700253 ]
ehmaldonado36268652017-01-19 08:27:11 -0800254
kjellandere40a7ee2016-10-16 23:56:12 -0700255 if (!build_with_chromium && is_clang) {
minyue4aec1d42016-09-21 23:01:26 -0700256 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
257 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
258 }
kjellanderfb114242016-06-13 00:19:48 -0700259
260 deps += [
ehmaldonado26bddb92016-11-30 06:12:01 -0800261 "../test:test_main",
ehmaldonado36268652017-01-19 08:27:11 -0800262 "audio_coding:audio_coding_unittests",
ehmaldonado9410b512017-01-19 11:57:56 -0800263 "audio_conference_mixer:audio_conference_mixer_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800264 "audio_device:audio_device_unittests",
265 "audio_mixer:audio_mixer_unittests",
266 "audio_processing:audio_processing_unittests",
267 "bitrate_controller:bitrate_controller_unittests",
268 "congestion_controller:congestion_controller_unittests",
269 "desktop_capture:desktop_capture_unittests",
270 "media_file:media_file_unittests",
271 "pacing:pacing_unittests",
272 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
273 "rtp_rtcp:rtp_rtcp_unittests",
274 "utility:utility_unittests",
275 "video_coding:video_coding_unittests",
276 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700277 ]
278
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700279 data = modules_unittests_resources
280
kjellanderfb114242016-06-13 00:19:48 -0700281 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700282 deps += [
283 "//testing/android/native_test:native_test_support",
magjed768c6482016-12-06 04:29:37 -0800284 "//webrtc/sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700285 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700286 shard_timeout = 900
287 }
kjellanderfb114242016-06-13 00:19:48 -0700288 if (is_ios) {
kthelgasonc37e9832016-09-22 08:00:52 -0700289 info_plist = "//webrtc/test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700290 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800291 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700292 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700293 }
294 }
terelius3dcfd642016-10-07 00:39:56 -0700295
296 rtc_test("bwe_simulator") {
297 testonly = true
298
299 deps = []
300 sources = [
301 "remote_bitrate_estimator/bwe_simulations.cc",
302 ]
303
kjellandere40a7ee2016-10-16 23:56:12 -0700304 if (!build_with_chromium && is_clang) {
terelius3dcfd642016-10-07 00:39:56 -0700305 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
306 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
307 }
308
309 if (is_win) {
310 cflags = [
311 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
312 "/wd4373", # virtual function override.
313 ]
314 }
315
316 deps += [
317 "..:webrtc_common",
318 "../base:rtc_base_approved",
319 "../test:test_common",
ehmaldonado26bddb92016-11-30 06:12:01 -0800320 "../test:test_main",
terelius3dcfd642016-10-07 00:39:56 -0700321 "remote_bitrate_estimator:bwe_simulator_lib",
322 "video_capture",
323 "//testing/gmock",
324 "//testing/gtest",
325 "//third_party/gflags",
326 ]
327 }
kjellanderfb114242016-06-13 00:19:48 -0700328}