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

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

Issue 2845063002: Hiding problematic targets from chromium (Closed)
Patch Set: 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 if (!build_with_chromium) {
100 testonly = true 100 # This target depends on //third_party/gflags and since chromium does not
101 sources = [ 101 # have gflags it causes an error when Gn parses this BUILD.gn file.
102 "test_main.cc", 102 # It seems that Gn eagerly tries to understand if all the targets are
103 ] 103 # buildable (even deps). Obviously gflags is not buildable in chromium
104 # so if a target depends on this BUILD.gn file we hit this error.
105 rtc_source_set("test_main") {
106 testonly = true
107 sources = [
108 "test_main.cc",
109 ]
104 110
105 public_deps = [ 111 public_deps = [
106 ":test_support", 112 ":test_support",
107 ] 113 ]
108 deps = [ 114 deps = [
109 ":field_trial", 115 ":field_trial",
110 "../system_wrappers:metrics_default", 116 "../system_wrappers:metrics_default",
111 "//testing/gmock", 117 "//testing/gmock",
112 "//testing/gtest", 118 "//testing/gtest",
113 "//third_party/gflags", 119 "//third_party/gflags",
114 ] 120 ]
121 }
115 } 122 }
116 123
117 rtc_source_set("fileutils") { 124 rtc_source_set("fileutils") {
118 testonly = true 125 testonly = true
119 sources = [ 126 sources = [
120 "testsupport/fileutils.cc", 127 "testsupport/fileutils.cc",
121 "testsupport/fileutils.h", 128 "testsupport/fileutils.h",
122 ] 129 ]
123 if (is_ios) { 130 if (is_ios) {
124 sources += [ "testsupport/iosfileutils.mm" ] 131 sources += [ "testsupport/iosfileutils.mm" ]
125 } 132 }
126 visibility = [ ":*" ] 133 visibility = [ ":*" ]
127 } 134 }
128 135
129 rtc_source_set("video_test_support") { 136 if (!build_with_chromium) {
kjellander_webrtc 2017/04/27 12:39:44 Let's move the lower targets up so we can avoid ha
mbonadei 2017/04/27 12:46:43 Done.
130 testonly = true 137 # This target depends on //third_party/gflags and since chromium does not
138 # have gflags it causes an error when Gn parses this BUILD.gn file.
139 # It seems that Gn eagerly tries to understand if all the targets are
140 # buildable (even deps). Obviously gflags is not buildable in chromium
141 # so if a target depends on this BUILD.gn file we hit this error.
142 rtc_source_set("video_test_support") {
143 testonly = true
131 144
132 sources = [ 145 sources = [
133 "testsupport/frame_reader.h", 146 "testsupport/frame_reader.h",
134 "testsupport/frame_writer.h", 147 "testsupport/frame_writer.h",
135 "testsupport/metrics/video_metrics.cc", 148 "testsupport/metrics/video_metrics.cc",
136 "testsupport/metrics/video_metrics.h", 149 "testsupport/metrics/video_metrics.h",
137 "testsupport/mock/mock_frame_reader.h", 150 "testsupport/mock/mock_frame_reader.h",
138 "testsupport/mock/mock_frame_writer.h", 151 "testsupport/mock/mock_frame_writer.h",
139 "testsupport/y4m_frame_writer.cc", 152 "testsupport/y4m_frame_writer.cc",
140 "testsupport/yuv_frame_reader.cc", 153 "testsupport/yuv_frame_reader.cc",
141 "testsupport/yuv_frame_writer.cc", 154 "testsupport/yuv_frame_writer.cc",
142 ] 155 ]
143 156
144 deps = [ 157 deps = [
145 "../base:rtc_base_approved", 158 "../base:rtc_base_approved",
146 "../common_video", 159 "../common_video",
147 "../system_wrappers", 160 "../system_wrappers",
148 "//testing/gmock", 161 "//testing/gmock",
149 "//testing/gtest", 162 "//testing/gtest",
150 "//third_party/gflags", 163 "//third_party/gflags",
151 ] 164 ]
152 165
153 public_deps = [ 166 public_deps = [
154 ":fileutils", 167 ":fileutils",
155 ] 168 ]
156 169
157 if (!build_with_chromium && is_clang) { 170 if (!build_with_chromium && is_clang) {
158 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 171 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
159 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 172 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
160 } 173 }
161 174
162 if (is_android) { 175 if (is_android) {
163 deps += [ "//base:base" ] 176 deps += [ "//base:base" ]
164 } 177 }
165 178
166 if (is_ios) { 179 if (is_ios) {
167 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ] 180 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ]
168 } 181 }
169 182
170 if (rtc_use_memcheck) { 183 if (rtc_use_memcheck) {
171 data = valgrind_webrtc_dependencies 184 data = valgrind_webrtc_dependencies
185 }
172 } 186 }
173 } 187 }
174 188
175 rtc_source_set("test_support") { 189 if (!build_with_chromium) {
176 testonly = true 190 # This target depends on //third_party/gflags and since chromium does not
191 # have gflags it causes an error when Gn parses this BUILD.gn file.
192 # It seems that Gn eagerly tries to understand if all the targets are
193 # buildable (even deps). Obviously gflags is not buildable in chromium
194 # so if a target depends on this BUILD.gn file we hit this error.
195 rtc_source_set("test_support") {
196 testonly = true
177 197
178 sources = [ 198 sources = [
179 "gmock.h", 199 "gmock.h",
180 "gtest.h", 200 "gtest.h",
181 "testsupport/isolated_output.cc", 201 "testsupport/isolated_output.cc",
182 "testsupport/isolated_output.h", 202 "testsupport/isolated_output.h",
183 "testsupport/packet_reader.cc", 203 "testsupport/packet_reader.cc",
184 "testsupport/packet_reader.h", 204 "testsupport/packet_reader.h",
185 "testsupport/perf_test.cc", 205 "testsupport/perf_test.cc",
186 "testsupport/perf_test.h", 206 "testsupport/perf_test.h",
187 "testsupport/trace_to_stderr.cc", 207 "testsupport/trace_to_stderr.cc",
188 "testsupport/trace_to_stderr.h", 208 "testsupport/trace_to_stderr.h",
189 "testsupport/unittest_utils.h", 209 "testsupport/unittest_utils.h",
190 ] 210 ]
191 211
192 deps = [ 212 deps = [
193 "../base:gtest_prod", 213 "../base:gtest_prod",
194 "../base:rtc_base_approved", 214 "../base:rtc_base_approved",
195 "../common_video", 215 "../common_video",
196 "../system_wrappers", 216 "../system_wrappers",
197 "//testing/gmock", 217 "//testing/gmock",
198 "//testing/gtest", 218 "//testing/gtest",
199 "//third_party/gflags", 219 "//third_party/gflags",
200 ] 220 ]
201 221
202 public_deps = [ 222 public_deps = [
203 ":fileutils", 223 ":fileutils",
204 ] 224 ]
205 225
206 if (!build_with_chromium && is_clang) { 226 if (!build_with_chromium && is_clang) {
207 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163). 227 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
208 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ] 228 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
209 } 229 }
210 230
211 if (is_android) { 231 if (is_android) {
212 deps += [ "//base:base" ] 232 deps += [ "//base:base" ]
213 } 233 }
214 234
215 if (is_ios) { 235 if (is_ios) {
216 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ] 236 deps += [ "//webrtc/sdk:rtc_sdk_common_objc" ]
217 } 237 }
218 238
219 if (rtc_use_memcheck) { 239 if (rtc_use_memcheck) {
220 data = valgrind_webrtc_dependencies 240 data = valgrind_webrtc_dependencies
241 }
221 } 242 }
222 } 243 }
223 244
224 rtc_source_set("run_test") { 245 rtc_source_set("run_test") {
225 testonly = true 246 testonly = true
226 sources = [ 247 sources = [
227 "run_test.h", 248 "run_test.h",
228 ] 249 ]
229 if (is_mac) { 250 if (is_mac) {
230 sources += [ "mac/run_test.mm" ] 251 sources += [ "mac/run_test.mm" ]
(...skipping 15 matching lines...) Expand all
246 if (is_ios) { 267 if (is_ios) {
247 bundle_data("test_support_unittests_bundle_data") { 268 bundle_data("test_support_unittests_bundle_data") {
248 testonly = true 269 testonly = true
249 sources = test_support_unittests_resources 270 sources = test_support_unittests_resources
250 outputs = [ 271 outputs = [
251 "{{bundle_resources_dir}}/{{source_file_part}}", 272 "{{bundle_resources_dir}}/{{source_file_part}}",
252 ] 273 ]
253 } 274 }
254 } 275 }
255 276
256 rtc_test("test_support_unittests") { 277 if (!build_with_chromium) {
257 deps = [] 278 # This target depends on //third_party/gflags and since chromium does not
258 sources = [ 279 # have gflags it causes an error when Gn parses this BUILD.gn file.
259 "fake_audio_device_unittest.cc", 280 # It seems that Gn eagerly tries to understand if all the targets are
260 "fake_network_pipe_unittest.cc", 281 # buildable (even deps). Obviously gflags is not buildable in chromium
261 "frame_generator_unittest.cc", 282 # so if a target depends on this BUILD.gn file we hit this error.
262 "rtp_file_reader_unittest.cc", 283 rtc_test("test_support_unittests") {
263 "rtp_file_writer_unittest.cc", 284 deps = []
264 "testsupport/always_passing_unittest.cc", 285 sources = [
265 "testsupport/isolated_output_unittest.cc", 286 "fake_audio_device_unittest.cc",
266 "testsupport/metrics/video_metrics_unittest.cc", 287 "fake_network_pipe_unittest.cc",
267 "testsupport/packet_reader_unittest.cc", 288 "frame_generator_unittest.cc",
268 "testsupport/perf_test_unittest.cc", 289 "rtp_file_reader_unittest.cc",
269 "testsupport/y4m_frame_writer_unittest.cc", 290 "rtp_file_writer_unittest.cc",
270 "testsupport/yuv_frame_reader_unittest.cc", 291 "testsupport/always_passing_unittest.cc",
271 "testsupport/yuv_frame_writer_unittest.cc", 292 "testsupport/isolated_output_unittest.cc",
272 ] 293 "testsupport/metrics/video_metrics_unittest.cc",
294 "testsupport/packet_reader_unittest.cc",
295 "testsupport/perf_test_unittest.cc",
296 "testsupport/y4m_frame_writer_unittest.cc",
297 "testsupport/yuv_frame_reader_unittest.cc",
298 "testsupport/yuv_frame_writer_unittest.cc",
299 ]
273 300
274 # TODO(jschuh): Bug 1348: fix this warning. 301 # TODO(jschuh): Bug 1348: fix this warning.
275 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] 302 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ]
276 303
277 if (is_win) { 304 if (is_win) {
278 cflags = [ "/wd4373" ] # virtual override w/different const/volatile signat ure. 305 cflags = [ "/wd4373" ] # virtual override w/different const/volatile sign ature.
306 }
307
308 if (!build_with_chromium && is_clang) {
309 # Suppress warnings from the Chromium Clang plugin (bugs.webrtc.org/163).
310 suppressed_configs += [ "//build/config/clang:find_bad_constructs" ]
311 }
312
313 data = test_support_unittests_resources
314 if (is_android) {
315 deps += [ "//testing/android/native_test:native_test_support" ]
316 shard_timeout = 900
317 }
318
319 if (is_ios) {
320 deps += [ ":test_support_unittests_bundle_data" ]
321 }
322
323 deps += [
324 ":direct_transport",
325 ":fileutils_unittests",
326 ":test_common",
327 ":test_main",
328 ":video_test_common",
329 ":video_test_support",
330 "../modules/video_capture",
331 "//testing/gmock",
332 "//testing/gtest",
333 "//third_party/gflags",
334 ]
279 } 335 }
336 }
280 337
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") { 338 rtc_source_set("fileutils_unittests") {
310 testonly = true 339 testonly = true
311 visibility = [ ":*" ] # Only targets in this file can depend on this. 340 visibility = [ ":*" ] # Only targets in this file can depend on this.
312 sources = [ 341 sources = [
313 "testsupport/fileutils_unittest.cc", 342 "testsupport/fileutils_unittest.cc",
314 ] 343 ]
315 deps = [ 344 deps = [
316 ":fileutils", 345 ":fileutils",
317 "//testing/gmock", 346 "//testing/gmock",
318 "//testing/gtest", 347 "//testing/gtest",
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 ] 520 ]
492 } 521 }
493 522
494 rtc_source_set("audio_codec_mocks") { 523 rtc_source_set("audio_codec_mocks") {
495 testonly = true 524 testonly = true
496 sources = [ 525 sources = [
497 "mock_audio_decoder.h", 526 "mock_audio_decoder.h",
498 "mock_audio_decoder_factory.h", 527 "mock_audio_decoder_factory.h",
499 ] 528 ]
500 } 529 }
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