Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(129)

Side by Side Diff: webrtc/test/BUILD.gn

Issue 2845063002: Hiding problematic targets from chromium (Closed)
Patch Set: moving test_support_unittests_resources to fix error Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 1 # Copyright (c) 2014 The WebRTC project authors. All Rights Reserved.
2 # 2 #
3 # Use of this source code is governed by a BSD-style license 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 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 5 # tree. An additional intellectual property rights grant can be found
6 # in the file PATENTS. All contributing project authors may 6 # in the file PATENTS. All contributing project authors may
7 # be found in the AUTHORS file in the root of the source tree. 7 # be found in the AUTHORS file in the root of the source tree.
8 8
9 import("../webrtc.gni") 9 import("../webrtc.gni")
10 import("//build/config/ui.gni") 10 import("//build/config/ui.gni")
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 "field_trial.h", 89 "field_trial.h",
90 ] 90 ]
91 91
92 deps = [ 92 deps = [
93 "..:webrtc_common", 93 "..:webrtc_common",
94 "../system_wrappers", 94 "../system_wrappers",
95 "../system_wrappers:field_trial_default", 95 "../system_wrappers:field_trial_default",
96 ] 96 ]
97 } 97 }
98 98
99 rtc_source_set("test_main") { 99 test_support_unittests_resources = [
100 testonly = true 100 "//resources/foreman_cif_short.yuv",
101 sources = [ 101 "//resources/video_coding/frame-ethernet-ii.pcap",
102 "test_main.cc", 102 "//resources/video_coding/frame-loopback.pcap",
103 ] 103 "//resources/video_coding/pltype103.rtp",
104 104 "//resources/video_coding/pltype103_header_only.rtp",
105 public_deps = [ 105 "//resources/video_coding/ssrcs-2.pcap",
106 ":test_support", 106 "//resources/video_coding/ssrcs-3.pcap",
107 ] 107 ]
108 deps = [ 108
109 ":field_trial", 109 if (!build_with_chromium) {
110 "../system_wrappers:metrics_default", 110 # This target depends on //third_party/gflags and since chromium does not
111 "//testing/gmock", 111 # have gflags it causes an error when Gn parses this BUILD.gn file.
112 "//testing/gtest", 112 # It seems that Gn eagerly tries to understand if all the targets are
113 "//third_party/gflags", 113 # buildable (even deps). Obviously gflags is not buildable in chromium
114 ] 114 # so if a target depends on this BUILD.gn file we hit this error.
115 rtc_source_set("test_main") {
116 testonly = true
117 sources = [
118 "test_main.cc",
119 ]
120
121 public_deps = [
122 ":test_support",
123 ]
124 deps = [
125 ":field_trial",
126 "../system_wrappers:metrics_default",
127 "//testing/gmock",
128 "//testing/gtest",
129 "//third_party/gflags",
130 ]
131 }
132
133 rtc_source_set("video_test_support") {
134 testonly = true
135
136 sources = [
137 "testsupport/frame_reader.h",
138 "testsupport/frame_writer.h",
139 "testsupport/metrics/video_metrics.cc",
140 "testsupport/metrics/video_metrics.h",
141 "testsupport/mock/mock_frame_reader.h",
142 "testsupport/mock/mock_frame_writer.h",
143 "testsupport/y4m_frame_writer.cc",
144 "testsupport/yuv_frame_reader.cc",
145 "testsupport/yuv_frame_writer.cc",
146 ]
147
148 deps = [
149 "../base:rtc_base_approved",
150 "../common_video",
151 "../system_wrappers",
152 "//testing/gmock",
153 "//testing/gtest",
154 "//third_party/gflags",
155 ]
156
157 public_deps = [
158 ":fileutils",
159 ]
160
161 if (!build_with_chromium && is_clang) {
162 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
163 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
164 }
165
166 if (is_android) {
167 deps += [ "//base:base" ]
168 }
169
170 if (is_ios) {
171 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ]
172 }
173
174 if (rtc_use_memcheck) {
175 data = valgrind_webrtc_dependencies
176 }
177 }
178
179 rtc_source_set("test_support") {
180 testonly = true
181
182 sources = [
183 "gmock.h",
184 "gtest.h",
185 "testsupport/isolated_output.cc",
186 "testsupport/isolated_output.h",
187 "testsupport/packet_reader.cc",
188 "testsupport/packet_reader.h",
189 "testsupport/perf_test.cc",
190 "testsupport/perf_test.h",
191 "testsupport/trace_to_stderr.cc",
192 "testsupport/trace_to_stderr.h",
193 "testsupport/unittest_utils.h",
194 ]
195
196 deps = [
197 "../base:gtest_prod",
198 "../base:rtc_base_approved",
199 "../common_video",
200 "../system_wrappers",
201 "//testing/gmock",
202 "//testing/gtest",
203 "//third_party/gflags",
204 ]
205
206 public_deps = [
207 ":fileutils",
208 ]
209
210 if (!build_with_chromium && is_clang) {
211 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
212 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
213 }
214
215 if (is_android) {
216 deps += [ "//base:base" ]
217 }
218
219 if (is_ios) {
220 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ]
221 }
222
223 if (rtc_use_memcheck) {
224 data = valgrind_webrtc_dependencies
225 }
226 }
227
228 rtc_test("test_support_unittests") {
229 deps = []
230 sources = [
231 "fake_audio_device_unittest.cc",
232 "fake_network_pipe_unittest.cc",
233 "frame_generator_unittest.cc",
234 "rtp_file_reader_unittest.cc",
235 "rtp_file_writer_unittest.cc",
236 "testsupport/always_passing_unittest.cc",
237 "testsupport/isolated_output_unittest.cc",
238 "testsupport/metrics/video_metrics_unittest.cc",
239 "testsupport/packet_reader_unittest.cc",
240 "testsupport/perf_test_unittest.cc",
241 "testsupport/y4m_frame_writer_unittest.cc",
242 "testsupport/yuv_frame_reader_unittest.cc",
243 "testsupport/yuv_frame_writer_unittest.cc",
244 ]
245
246 # TODO(jschuh): Bug 1348: fix this warning.
247 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
248
249 if (is_win) {
250 cflags = [ "/wd4373" ] # virtual override w/different const/volatile sign ature.
251 }
252
253 if (!build_with_chromium && is_clang) {
254 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
255 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
256 }
257
258 data = test_support_unittests_resources
259 if (is_android) {
260 deps += [ "//testing/android/native_test:native_test_support" ]
261 shard_timeout = 900
262 }
263
264 if (is_ios) {
265 deps += [ ":test_support_unittests_bundle_data" ]
266 }
267
268 deps += [
269 ":direct_transport",
270 ":fileutils_unittests",
271 ":test_common",
272 ":test_main",
273 ":video_test_common",
274 ":video_test_support",
275 "../modules/video_capture",
276 "//testing/gmock",
277 "//testing/gtest",
278 "//third_party/gflags",
279 ]
280 }
115 } 281 }
116 282
117 rtc_source_set("fileutils") { 283 rtc_source_set("fileutils") {
118 testonly = true 284 testonly = true
119 sources = [ 285 sources = [
120 "testsupport/fileutils.cc", 286 "testsupport/fileutils.cc",
121 "testsupport/fileutils.h", 287 "testsupport/fileutils.h",
122 ] 288 ]
123 if (is_ios) { 289 if (is_ios) {
124 sources += [ "testsupport/iosfileutils.mm" ] 290 sources += [ "testsupport/iosfileutils.mm" ]
125 } 291 }
126 visibility = [ ":*" ] 292 visibility = [ ":*" ]
127 } 293 }
128 294
129 rtc_source_set("video_test_support") {
130 testonly = true
131
132 sources = [
133 "testsupport/frame_reader.h",
134 "testsupport/frame_writer.h",
135 "testsupport/metrics/video_metrics.cc",
136 "testsupport/metrics/video_metrics.h",
137 "testsupport/mock/mock_frame_reader.h",
138 "testsupport/mock/mock_frame_writer.h",
139 "testsupport/y4m_frame_writer.cc",
140 "testsupport/yuv_frame_reader.cc",
141 "testsupport/yuv_frame_writer.cc",
142 ]
143
144 deps = [
145 "../base:rtc_base_approved",
146 "../common_video",
147 "../system_wrappers",
148 "//testing/gmock",
149 "//testing/gtest",
150 "//third_party/gflags",
151 ]
152
153 public_deps = [
154 ":fileutils",
155 ]
156
157 if (!build_with_chromium && is_clang) {
158 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
159 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
160 }
161
162 if (is_android) {
163 deps += [ "//base:base" ]
164 }
165
166 if (is_ios) {
167 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ]
168 }
169
170 if (rtc_use_memcheck) {
171 data = valgrind_webrtc_dependencies
172 }
173 }
174
175 rtc_source_set("test_support") {
176 testonly = true
177
178 sources = [
179 "gmock.h",
180 "gtest.h",
181 "testsupport/isolated_output.cc",
182 "testsupport/isolated_output.h",
183 "testsupport/packet_reader.cc",
184 "testsupport/packet_reader.h",
185 "testsupport/perf_test.cc",
186 "testsupport/perf_test.h",
187 "testsupport/trace_to_stderr.cc",
188 "testsupport/trace_to_stderr.h",
189 "testsupport/unittest_utils.h",
190 ]
191
192 deps = [
193 "../base:gtest_prod",
194 "../base:rtc_base_approved",
195 "../common_video",
196 "../system_wrappers",
197 "//testing/gmock",
198 "//testing/gtest",
199 "//third_party/gflags",
200 ]
201
202 public_deps = [
203 ":fileutils",
204 ]
205
206 if (!build_with_chromium && is_clang) {
207 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
208 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
209 }
210
211 if (is_android) {
212 deps += [ "//base:base" ]
213 }
214
215 if (is_ios) {
216 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ]
217 }
218
219 if (rtc_use_memcheck) {
220 data = valgrind_webrtc_dependencies
221 }
222 }
223
224 rtc_source_set("run_test") { 295 rtc_source_set("run_test") {
225 testonly = true 296 testonly = true
226 sources = [ 297 sources = [
227 "run_test.h", 298 "run_test.h",
228 ] 299 ]
229 if (is_mac) { 300 if (is_mac) {
230 sources += [ "mac/run_test.mm" ] 301 sources += [ "mac/run_test.mm" ]
231 } else { 302 } else {
232 sources += [ "run_test.cc" ] 303 sources += [ "run_test.cc" ]
233 } 304 }
234 } 305 }
235 306
236 test_support_unittests_resources = [
237 "//resources/foreman_cif_short.yuv",
238 "//resources/video_coding/frame-ethernet-ii.pcap",
239 "//resources/video_coding/frame-loopback.pcap",
240 "//resources/video_coding/pltype103.rtp",
241 "//resources/video_coding/pltype103_header_only.rtp",
242 "//resources/video_coding/ssrcs-2.pcap",
243 "//resources/video_coding/ssrcs-3.pcap",
244 ]
245
246 if (is_ios) { 307 if (is_ios) {
kjellander_webrtc 2017/04/27 16:24:54 Isn't it nicer to also move this up to under test_
mbonadei 2017/04/27 17:18:50 Yep, good advice. Done.
247 bundle_data("test_support_unittests_bundle_data") { 308 bundle_data("test_support_unittests_bundle_data") {
248 testonly = true 309 testonly = true
249 sources = test_support_unittests_resources 310 sources = test_support_unittests_resources
250 outputs = [ 311 outputs = [
251 "{{bundle_resources_dir}}/{{source_file_part}}", 312 "{{bundle_resources_dir}}/{{source_file_part}}",
252 ] 313 ]
253 } 314 }
254 } 315 }
255 316
256 rtc_test("test_support_unittests") {
257 deps = []
258 sources = [
259 "fake_audio_device_unittest.cc",
260 "fake_network_pipe_unittest.cc",
261 "frame_generator_unittest.cc",
262 "rtp_file_reader_unittest.cc",
263 "rtp_file_writer_unittest.cc",
264 "testsupport/always_passing_unittest.cc",
265 "testsupport/isolated_output_unittest.cc",
266 "testsupport/metrics/video_metrics_unittest.cc",
267 "testsupport/packet_reader_unittest.cc",
268 "testsupport/perf_test_unittest.cc",
269 "testsupport/y4m_frame_writer_unittest.cc",
270 "testsupport/yuv_frame_reader_unittest.cc",
271 "testsupport/yuv_frame_writer_unittest.cc",
272 ]
273
274 # TODO(jschuh): Bug 1348: fix this warning.
275 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
276
277 if (is_win) {
278 cflags = [ "/wd4373" ] # virtual override w/different const/volatile signat ure.
279 }
280
281 if (!build_with_chromium && is_clang) {
282 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
283 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
284 }
285
286 data = test_support_unittests_resources
287 if (is_android) {
288 deps += [ "//testing/android/native_test:native_test_support" ]
289 shard_timeout = 900
290 }
291
292 if (is_ios) {
293 deps += [ ":test_support_unittests_bundle_data" ]
294 }
295
296 deps += [
297 ":direct_transport",
298 ":fileutils_unittests",
299 ":test_common",
300 ":test_main",
301 ":video_test_common",
302 ":video_test_support",
303 "../modules/video_capture",
304 "//testing/gmock",
305 "//testing/gtest",
306 "//third_party/gflags",
307 ]
308 }
309 rtc_source_set("fileutils_unittests") { 317 rtc_source_set("fileutils_unittests") {
310 testonly = true 318 testonly = true
311 visibility = [ ":*" ] # Only targets in this file can depend on this. 319 visibility = [ ":*" ] # Only targets in this file can depend on this.
312 sources = [ 320 sources = [
313 "testsupport/fileutils_unittest.cc", 321 "testsupport/fileutils_unittest.cc",
314 ] 322 ]
315 deps = [ 323 deps = [
316 ":fileutils", 324 ":fileutils",
317 "//testing/gmock", 325 "//testing/gmock",
318 "//testing/gtest", 326 "//testing/gtest",
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 ] 499 ]
492 } 500 }
493 501
494 rtc_source_set("audio_codec_mocks") { 502 rtc_source_set("audio_codec_mocks") {
495 testonly = true 503 testonly = true
496 sources = [ 504 sources = [
497 "mock_audio_decoder.h", 505 "mock_audio_decoder.h",
498 "mock_audio_decoder_factory.h", 506 "mock_audio_decoder_factory.h",
499 ] 507 ]
500 } 508 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698