blob: 44cb1ebd51cf2ceeba10826fe78e55b9076a8f1a [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",
27 "video_coding",
28 "video_processing",
29 ]
30}
31
32if (rtc_include_tests) {
ehmaldonado3a7f35b2016-09-14 05:10:01 -070033 modules_tests_resources = [
34 "//resources/audio_coding/testfile32kHz.pcm",
35 "//resources/audio_coding/teststereo32kHz.pcm",
36 "//resources/foreman_cif.yuv",
37 "//resources/paris_qcif.yuv",
38 ]
kjellander32c4a202016-08-30 02:53:49 -070039
40 if (is_ios) {
41 bundle_data("modules_tests_bundle_data") {
42 testonly = true
43 sources = modules_tests_resources
44 outputs = [
45 "{{bundle_resources_dir}}/{{source_file_part}}",
46 ]
47 }
48 }
49
ehmaldonado38a21322016-09-02 04:10:34 -070050 rtc_test("modules_tests") {
ehmaldonadof98dc102016-08-03 10:46:47 -070051 testonly = true
52
ehmaldonado3373eaa2017-01-25 08:11:28 -080053 videoprocessor_defines = []
54 if (rtc_use_h264) {
55 videoprocessor_defines += [ "WEBRTC_VIDEOPROCESSOR_H264_TESTS" ]
56 }
57
58 defines = audio_coding_defines + videoprocessor_defines
59
ehmaldonadof98dc102016-08-03 10:46:47 -070060 deps = [
ehmaldonado3373eaa2017-01-25 08:11:28 -080061 "..:webrtc_common",
62 "../common_video",
63 "../media:rtc_media_base",
64 "../modules/audio_coding",
65 "../modules/audio_coding:audio_format_conversion",
66 "../modules/rtp_rtcp",
67 "../modules/utility",
68 "../modules/video_coding",
69 "../modules/video_coding:video_codecs_test_framework",
70 "../system_wrappers",
ehmaldonado26bddb92016-11-30 06:12:01 -080071 "../test:test_main",
zijiehe6be0a652016-10-27 16:50:35 -070072 "//testing/gmock",
ehmaldonadof98dc102016-08-03 10:46:47 -070073 "//testing/gtest",
74 ]
75
ehmaldonado3373eaa2017-01-25 08:11:28 -080076 sources = [
77 "audio_coding/test/APITest.cc",
78 "audio_coding/test/Channel.cc",
79 "audio_coding/test/EncodeDecodeTest.cc",
80 "audio_coding/test/PCMFile.cc",
81 "audio_coding/test/PacketLossTest.cc",
82 "audio_coding/test/RTPFile.cc",
83 "audio_coding/test/TestAllCodecs.cc",
84 "audio_coding/test/TestRedFec.cc",
85 "audio_coding/test/TestStereo.cc",
86 "audio_coding/test/TestVADDTX.cc",
87 "audio_coding/test/Tester.cc",
88 "audio_coding/test/TwoWayCommunication.cc",
89 "audio_coding/test/iSACTest.cc",
90 "audio_coding/test/opus_test.cc",
91 "audio_coding/test/target_delay_unittest.cc",
92 "audio_coding/test/utility.cc",
93 "rtp_rtcp/test/testFec/test_fec.cc",
94 "video_coding/codecs/test/videoprocessor_integrationtest.cc",
95 "video_coding/codecs/vp8/test/vp8_impl_unittest.cc",
96 ]
97
98 if (rtc_desktop_capture_supported) {
99 deps += [
100 "desktop_capture:desktop_capture_mock",
101 "desktop_capture:screen_drawer",
102 ]
103 sources += [
104 "desktop_capture/screen_capturer_integration_test.cc",
105 "desktop_capture/screen_drawer_unittest.cc",
106 ]
107 }
108
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700109 data = modules_tests_resources
110
ehmaldonadof98dc102016-08-03 10:46:47 -0700111 if (is_android) {
112 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -0700113 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -0700114 }
kjellander32c4a202016-08-30 02:53:49 -0700115
116 if (is_ios) {
117 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700118 }
119
kjellandere40a7ee2016-10-16 23:56:12 -0700120 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -0700121 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -0700122 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -0700123 }
124 if (is_win) {
125 cflags = [
126 # TODO(phoglund): get rid of 4373 supression when
127 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
128 # legacy warning for ignoring const / volatile in signatures.
129 "/wd4373",
130 ]
131 }
132 }
133
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700134 modules_unittests_resources = [
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700135 "//resources/att-downlink.rx",
136 "//resources/att-uplink.rx",
137 "//resources/audio_coding/neteq_opus.rtp",
138 "//resources/audio_coding/neteq_universal_new.rtp",
139 "//resources/audio_coding/speech_mono_16kHz.pcm",
140 "//resources/audio_coding/speech_mono_32_48kHz.pcm",
141 "//resources/audio_coding/testfile32kHz.pcm",
142 "//resources/audio_coding/teststereo32kHz.pcm",
143 "//resources/audio_device/audio_short16.pcm",
144 "//resources/audio_device/audio_short44.pcm",
145 "//resources/audio_device/audio_short48.pcm",
146 "//resources/audio_processing/agc/agc_audio.pcm",
147 "//resources/audio_processing/agc/agc_no_circular_buffer.dat",
148 "//resources/audio_processing/agc/agc_pitch_gain.dat",
149 "//resources/audio_processing/agc/agc_pitch_lag.dat",
150 "//resources/audio_processing/agc/agc_spectral_peak.dat",
151 "//resources/audio_processing/agc/agc_vad.dat",
152 "//resources/audio_processing/agc/agc_voicing_prob.dat",
153 "//resources/audio_processing/agc/agc_with_circular_buffer.dat",
ehmaldonadodedaf1c2016-11-18 04:52:22 -0800154 "//resources/audio_processing/output_data_fixed.pb",
155 "//resources/audio_processing/output_data_float.pb",
156 "//resources/audio_processing/output_data_mac.pb",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700157 "//resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
158 "//resources/audio_processing/transient/audio16kHz.pcm",
159 "//resources/audio_processing/transient/audio32kHz.pcm",
160 "//resources/audio_processing/transient/audio48kHz.pcm",
161 "//resources/audio_processing/transient/audio8kHz.pcm",
162 "//resources/audio_processing/transient/detect16kHz.dat",
163 "//resources/audio_processing/transient/detect32kHz.dat",
164 "//resources/audio_processing/transient/detect48kHz.dat",
165 "//resources/audio_processing/transient/detect8kHz.dat",
166 "//resources/audio_processing/transient/double-utils.dat",
167 "//resources/audio_processing/transient/float-utils.dat",
168 "//resources/audio_processing/transient/suppressed16kHz.pcm",
169 "//resources/audio_processing/transient/suppressed32kHz.pcm",
170 "//resources/audio_processing/transient/suppressed8kHz.pcm",
171 "//resources/audio_processing/transient/wpd0.dat",
172 "//resources/audio_processing/transient/wpd1.dat",
173 "//resources/audio_processing/transient/wpd2.dat",
174 "//resources/audio_processing/transient/wpd3.dat",
175 "//resources/audio_processing/transient/wpd4.dat",
176 "//resources/audio_processing/transient/wpd5.dat",
177 "//resources/audio_processing/transient/wpd6.dat",
178 "//resources/audio_processing/transient/wpd7.dat",
179 "//resources/deflicker_before_cif_short.yuv",
180 "//resources/far16_stereo.pcm",
181 "//resources/far32_stereo.pcm",
182 "//resources/far44_stereo.pcm",
183 "//resources/far48_stereo.pcm",
184 "//resources/far8_stereo.pcm",
185 "//resources/foremanColorEnhanced_cif_short.yuv",
186 "//resources/foreman_cif.yuv",
187 "//resources/foreman_cif_short.yuv",
188 "//resources/near16_stereo.pcm",
189 "//resources/near32_stereo.pcm",
190 "//resources/near44_stereo.pcm",
191 "//resources/near48_stereo.pcm",
192 "//resources/near8_stereo.pcm",
193 "//resources/ref03.aecdump",
194 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
195 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
196 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
197 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
198 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
199 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
200 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
201 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
202 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
203 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
204 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
205 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
206 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
207 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
208 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
209 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
210 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
211 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
212 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
213 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
214 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
215 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
216 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
217 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
218 "//resources/short_mixed_mono_48.dat",
219 "//resources/short_mixed_mono_48_arm.dat",
220 "//resources/short_mixed_mono_48.pcm",
221 "//resources/short_mixed_stereo_48.dat",
222 "//resources/short_mixed_stereo_48.pcm",
223 "//resources/sprint-downlink.rx",
224 "//resources/sprint-uplink.rx",
225 "//resources/synthetic-trace.rx",
226 "//resources/tmobile-downlink.rx",
227 "//resources/tmobile-uplink.rx",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700228 "//resources/verizon3g-downlink.rx",
229 "//resources/verizon3g-uplink.rx",
230 "//resources/verizon4g-downlink.rx",
231 "//resources/verizon4g-uplink.rx",
ehmaldonadod661e9c2016-11-22 10:42:59 -0800232 "//resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700233 ]
kjellander32c4a202016-08-30 02:53:49 -0700234
235 if (is_ios) {
236 bundle_data("modules_unittests_bundle_data") {
237 testonly = true
238 sources = modules_unittests_resources
239 outputs = [
240 "{{bundle_resources_dir}}/{{source_file_part}}",
241 ]
242 }
243 }
244
ehmaldonado36268652017-01-19 08:27:11 -0800245 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700246 testonly = true
ehmaldonado36268652017-01-19 08:27:11 -0800247
248 deps = []
249 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700250 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800251 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700252 ]
ehmaldonado36268652017-01-19 08:27:11 -0800253
kjellandere40a7ee2016-10-16 23:56:12 -0700254 if (!build_with_chromium && is_clang) {
minyue4aec1d42016-09-21 23:01:26 -0700255 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
256 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
257 }
kjellanderfb114242016-06-13 00:19:48 -0700258
259 deps += [
ehmaldonado26bddb92016-11-30 06:12:01 -0800260 "../test:test_main",
ehmaldonado36268652017-01-19 08:27:11 -0800261 "audio_coding:audio_coding_unittests",
ehmaldonado9410b512017-01-19 11:57:56 -0800262 "audio_conference_mixer:audio_conference_mixer_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800263 "audio_device:audio_device_unittests",
264 "audio_mixer:audio_mixer_unittests",
265 "audio_processing:audio_processing_unittests",
266 "bitrate_controller:bitrate_controller_unittests",
267 "congestion_controller:congestion_controller_unittests",
268 "desktop_capture:desktop_capture_unittests",
269 "media_file:media_file_unittests",
270 "pacing:pacing_unittests",
271 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
272 "rtp_rtcp:rtp_rtcp_unittests",
273 "utility:utility_unittests",
274 "video_coding:video_coding_unittests",
275 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700276 ]
277
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700278 data = modules_unittests_resources
279
kjellanderfb114242016-06-13 00:19:48 -0700280 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700281 deps += [
282 "//testing/android/native_test:native_test_support",
magjed768c6482016-12-06 04:29:37 -0800283 "//webrtc/sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700284 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700285 shard_timeout = 900
286 }
kjellanderfb114242016-06-13 00:19:48 -0700287 if (is_ios) {
kthelgasonc37e9832016-09-22 08:00:52 -0700288 info_plist = "//webrtc/test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700289 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800290 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700291 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700292 }
293 }
ehmaldonado3373eaa2017-01-25 08:11:28 -0800294
295 rtc_test("bwe_simulator") {
296 testonly = true
297
298 deps = []
299 sources = [
300 "remote_bitrate_estimator/bwe_simulations.cc",
301 ]
302
303 if (!build_with_chromium && is_clang) {
304 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
305 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
306 }
307
308 if (is_win) {
309 cflags = [
310 # TODO(kjellander): bugs.webrtc.org/261: Fix this warning.
311 "/wd4373", # virtual function override.
312 ]
313 }
314
315 deps += [
316 "..:webrtc_common",
317 "../base:rtc_base_approved",
318 "../test:test_common",
319 "../test:test_main",
320 "remote_bitrate_estimator:bwe_simulator_lib",
321 "video_capture",
322 "//testing/gmock",
323 "//testing/gtest",
324 "//third_party/gflags",
325 ]
326 }
kjellanderfb114242016-06-13 00:19:48 -0700327}