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