blob: e750a81097ffb5a9887ada2709af2cbf19c96e49 [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
ehmaldonadof98dc102016-08-03 10:46:47 -070053 deps = [
ehmaldonado26bddb92016-11-30 06:12:01 -080054 "../test:test_main",
ehmaldonado656610f2017-02-06 02:21:11 -080055 "../test:video_test_common",
ehmaldonado9cbb0a12017-01-30 03:07:03 -080056 "audio_coding:audio_coding_modules_tests",
57 "desktop_capture:desktop_capture_modules_tests",
58 "rtp_rtcp:rtp_rtcp_modules_tests",
59 "video_coding:video_coding_modules_tests",
zijiehe6be0a652016-10-27 16:50:35 -070060 "//testing/gmock",
ehmaldonadof98dc102016-08-03 10:46:47 -070061 "//testing/gtest",
62 ]
63
ehmaldonado3a7f35b2016-09-14 05:10:01 -070064 data = modules_tests_resources
65
ehmaldonadof98dc102016-08-03 10:46:47 -070066 if (is_android) {
67 deps += [ "//testing/android/native_test:native_test_native_code" ]
sakal714dd4e2016-08-15 02:29:11 -070068 shard_timeout = 900
ehmaldonadof98dc102016-08-03 10:46:47 -070069 }
kjellander32c4a202016-08-30 02:53:49 -070070
71 if (is_ios) {
72 deps += [ ":modules_tests_bundle_data" ]
ehmaldonadof98dc102016-08-03 10:46:47 -070073 }
74
kjellandere40a7ee2016-10-16 23:56:12 -070075 if (!build_with_chromium && is_clang) {
ehmaldonadof98dc102016-08-03 10:46:47 -070076 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
ehmaldonado38a21322016-09-02 04:10:34 -070077 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
ehmaldonadof98dc102016-08-03 10:46:47 -070078 }
79 if (is_win) {
80 cflags = [
81 # TODO(phoglund): get rid of 4373 supression when
82 # http://code.google.com/p/webrtc/issues/detail?id=261 is solved.
83 # legacy warning for ignoring const / volatile in signatures.
84 "/wd4373",
85 ]
86 }
87 }
88
ehmaldonado3a7f35b2016-09-14 05:10:01 -070089 modules_unittests_resources = [
ehmaldonado3a7f35b2016-09-14 05:10:01 -070090 "//resources/att-downlink.rx",
91 "//resources/att-uplink.rx",
92 "//resources/audio_coding/neteq_opus.rtp",
93 "//resources/audio_coding/neteq_universal_new.rtp",
94 "//resources/audio_coding/speech_mono_16kHz.pcm",
95 "//resources/audio_coding/speech_mono_32_48kHz.pcm",
96 "//resources/audio_coding/testfile32kHz.pcm",
97 "//resources/audio_coding/teststereo32kHz.pcm",
98 "//resources/audio_device/audio_short16.pcm",
99 "//resources/audio_device/audio_short44.pcm",
100 "//resources/audio_device/audio_short48.pcm",
101 "//resources/audio_processing/agc/agc_audio.pcm",
102 "//resources/audio_processing/agc/agc_no_circular_buffer.dat",
103 "//resources/audio_processing/agc/agc_pitch_gain.dat",
104 "//resources/audio_processing/agc/agc_pitch_lag.dat",
105 "//resources/audio_processing/agc/agc_spectral_peak.dat",
106 "//resources/audio_processing/agc/agc_vad.dat",
107 "//resources/audio_processing/agc/agc_voicing_prob.dat",
108 "//resources/audio_processing/agc/agc_with_circular_buffer.dat",
ehmaldonadodedaf1c2016-11-18 04:52:22 -0800109 "//resources/audio_processing/output_data_fixed.pb",
110 "//resources/audio_processing/output_data_float.pb",
111 "//resources/audio_processing/output_data_mac.pb",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700112 "//resources/audio_processing/transient/ajm-macbook-1-spke16m.pcm",
113 "//resources/audio_processing/transient/audio16kHz.pcm",
114 "//resources/audio_processing/transient/audio32kHz.pcm",
115 "//resources/audio_processing/transient/audio48kHz.pcm",
116 "//resources/audio_processing/transient/audio8kHz.pcm",
117 "//resources/audio_processing/transient/detect16kHz.dat",
118 "//resources/audio_processing/transient/detect32kHz.dat",
119 "//resources/audio_processing/transient/detect48kHz.dat",
120 "//resources/audio_processing/transient/detect8kHz.dat",
121 "//resources/audio_processing/transient/double-utils.dat",
122 "//resources/audio_processing/transient/float-utils.dat",
123 "//resources/audio_processing/transient/suppressed16kHz.pcm",
124 "//resources/audio_processing/transient/suppressed32kHz.pcm",
125 "//resources/audio_processing/transient/suppressed8kHz.pcm",
126 "//resources/audio_processing/transient/wpd0.dat",
127 "//resources/audio_processing/transient/wpd1.dat",
128 "//resources/audio_processing/transient/wpd2.dat",
129 "//resources/audio_processing/transient/wpd3.dat",
130 "//resources/audio_processing/transient/wpd4.dat",
131 "//resources/audio_processing/transient/wpd5.dat",
132 "//resources/audio_processing/transient/wpd6.dat",
133 "//resources/audio_processing/transient/wpd7.dat",
134 "//resources/deflicker_before_cif_short.yuv",
135 "//resources/far16_stereo.pcm",
136 "//resources/far32_stereo.pcm",
137 "//resources/far44_stereo.pcm",
138 "//resources/far48_stereo.pcm",
139 "//resources/far8_stereo.pcm",
140 "//resources/foremanColorEnhanced_cif_short.yuv",
141 "//resources/foreman_cif.yuv",
142 "//resources/foreman_cif_short.yuv",
143 "//resources/near16_stereo.pcm",
144 "//resources/near32_stereo.pcm",
145 "//resources/near44_stereo.pcm",
146 "//resources/near48_stereo.pcm",
147 "//resources/near8_stereo.pcm",
148 "//resources/ref03.aecdump",
149 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_AST.bin",
150 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_0_TOF.bin",
151 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_AST.bin",
152 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke1_1_TOF.bin",
153 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_AST.bin",
154 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_0_TOF.bin",
155 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_AST.bin",
156 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingChoke2_1_TOF.bin",
157 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_AST.bin",
158 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingDelay1_0_TOF.bin",
159 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_AST.bin",
160 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_IncreasingLoss1_0_TOF.bin",
161 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_AST.bin",
162 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_Multi1_1_TOF.bin",
163 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_AST.bin",
164 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_0_TOF.bin",
165 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_AST.bin",
166 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyChoke_1_TOF.bin",
167 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_AST.bin",
168 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyDelay_0_TOF.bin",
169 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_AST.bin",
170 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_SteadyLoss_0_TOF.bin",
171 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_AST.bin",
172 "//resources/remote_bitrate_estimator/VideoSendersTest_BweTest_UnlimitedSpeed_0_TOF.bin",
173 "//resources/short_mixed_mono_48.dat",
174 "//resources/short_mixed_mono_48_arm.dat",
175 "//resources/short_mixed_mono_48.pcm",
176 "//resources/short_mixed_stereo_48.dat",
177 "//resources/short_mixed_stereo_48.pcm",
178 "//resources/sprint-downlink.rx",
179 "//resources/sprint-uplink.rx",
180 "//resources/synthetic-trace.rx",
181 "//resources/tmobile-downlink.rx",
182 "//resources/tmobile-uplink.rx",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700183 "//resources/verizon3g-downlink.rx",
184 "//resources/verizon3g-uplink.rx",
185 "//resources/verizon4g-downlink.rx",
186 "//resources/verizon4g-uplink.rx",
ehmaldonadod661e9c2016-11-22 10:42:59 -0800187 "//resources/voice_engine/audio_tiny48.wav",
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700188 ]
kjellander32c4a202016-08-30 02:53:49 -0700189
190 if (is_ios) {
191 bundle_data("modules_unittests_bundle_data") {
192 testonly = true
193 sources = modules_unittests_resources
194 outputs = [
195 "{{bundle_resources_dir}}/{{source_file_part}}",
196 ]
197 }
198 }
199
ehmaldonado36268652017-01-19 08:27:11 -0800200 rtc_test("modules_unittests") {
minyue4aec1d42016-09-21 23:01:26 -0700201 testonly = true
mbonadeibb08c3e2017-04-26 02:00:16 -0700202
203 deps = []
ehmaldonado36268652017-01-19 08:27:11 -0800204 defines = []
minyue4aec1d42016-09-21 23:01:26 -0700205 sources = [
ehmaldonado36268652017-01-19 08:27:11 -0800206 "module_common_types_unittest.cc",
minyue4aec1d42016-09-21 23:01:26 -0700207 ]
ehmaldonado36268652017-01-19 08:27:11 -0800208
kjellandere40a7ee2016-10-16 23:56:12 -0700209 if (!build_with_chromium && is_clang) {
minyue4aec1d42016-09-21 23:01:26 -0700210 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
211 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
212 }
kjellanderfb114242016-06-13 00:19:48 -0700213
214 deps += [
ehmaldonado26bddb92016-11-30 06:12:01 -0800215 "../test:test_main",
ehmaldonado36268652017-01-19 08:27:11 -0800216 "audio_coding:audio_coding_unittests",
ehmaldonado9410b512017-01-19 11:57:56 -0800217 "audio_conference_mixer:audio_conference_mixer_unittests",
ehmaldonado36268652017-01-19 08:27:11 -0800218 "audio_device:audio_device_unittests",
219 "audio_mixer:audio_mixer_unittests",
220 "audio_processing:audio_processing_unittests",
221 "bitrate_controller:bitrate_controller_unittests",
222 "congestion_controller:congestion_controller_unittests",
223 "desktop_capture:desktop_capture_unittests",
224 "media_file:media_file_unittests",
225 "pacing:pacing_unittests",
226 "remote_bitrate_estimator:remote_bitrate_estimator_unittests",
227 "rtp_rtcp:rtp_rtcp_unittests",
228 "utility:utility_unittests",
ehmaldonado656610f2017-02-06 02:21:11 -0800229 "video_capture",
ehmaldonado36268652017-01-19 08:27:11 -0800230 "video_coding:video_coding_unittests",
231 "video_processing:video_processing_unittests",
kjellanderfb114242016-06-13 00:19:48 -0700232 ]
233
ehmaldonado3a7f35b2016-09-14 05:10:01 -0700234 data = modules_unittests_resources
235
kjellanderfb114242016-06-13 00:19:48 -0700236 if (is_android) {
sakalbd59c712016-08-11 00:59:15 -0700237 deps += [
238 "//testing/android/native_test:native_test_support",
magjed768c6482016-12-06 04:29:37 -0800239 "//webrtc/sdk/android:libjingle_peerconnection_java",
sakalbd59c712016-08-11 00:59:15 -0700240 ]
kjellander28a0ffd2016-08-24 07:48:42 -0700241 shard_timeout = 900
242 }
kjellanderfb114242016-06-13 00:19:48 -0700243 if (is_ios) {
kthelgasonc37e9832016-09-22 08:00:52 -0700244 info_plist = "//webrtc/test/ios/Info.plist"
kjellander32c4a202016-08-30 02:53:49 -0700245 deps += [ ":modules_unittests_bundle_data" ]
ehmaldonado36268652017-01-19 08:27:11 -0800246 configs += [ "..:common_objc" ]
kjellanderfb114242016-06-13 00:19:48 -0700247 ldflags = [ "-ObjC" ]
kjellanderfb114242016-06-13 00:19:48 -0700248 }
249 }
kjellanderfb114242016-06-13 00:19:48 -0700250}