OLD | NEW |
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("../build/webrtc.gni") |
9 import("//build/config/ui.gni") | 10 import("//build/config/ui.gni") |
10 import("//testing/test.gni") | |
11 if (is_android) { | 11 if (is_android) { |
12 import("//build/config/android/rules.gni") | 12 import("//build/config/android/rules.gni") |
13 } | 13 } |
14 | 14 |
15 source_set("test") { | 15 rtc_source_set("test") { |
16 testonly = true | 16 testonly = true |
17 | 17 |
18 deps = [ | 18 deps = [ |
19 ":channel_transport", | 19 ":channel_transport", |
20 ":field_trial", | 20 ":field_trial", |
21 ":rtp_test_utils", | 21 ":rtp_test_utils", |
22 ":test_common", | 22 ":test_common", |
23 ":test_renderer", | 23 ":test_renderer", |
24 ":test_support", | 24 ":test_support", |
25 ":test_support_main", | 25 ":test_support_main", |
(...skipping 17 matching lines...) Expand all Loading... |
43 | 43 |
44 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6268 | 44 # See https://bugs.chromium.org/p/webrtc/issues/detail?id=6268 |
45 # for -Wno-thread-safety-analysis | 45 # for -Wno-thread-safety-analysis |
46 "-Wno-thread-safety-analysis", | 46 "-Wno-thread-safety-analysis", |
47 "-Wno-unused-private-field", | 47 "-Wno-unused-private-field", |
48 ] | 48 ] |
49 } | 49 } |
50 } | 50 } |
51 } | 51 } |
52 | 52 |
53 source_set("channel_transport") { | 53 rtc_source_set("channel_transport") { |
54 testonly = true | 54 testonly = true |
55 sources = [ | 55 sources = [ |
56 "channel_transport/channel_transport.cc", | 56 "channel_transport/channel_transport.cc", |
57 "channel_transport/channel_transport.h", | 57 "channel_transport/channel_transport.h", |
58 "channel_transport/traffic_control_win.cc", | 58 "channel_transport/traffic_control_win.cc", |
59 "channel_transport/traffic_control_win.h", | 59 "channel_transport/traffic_control_win.h", |
60 "channel_transport/udp_socket2_manager_win.cc", | 60 "channel_transport/udp_socket2_manager_win.cc", |
61 "channel_transport/udp_socket2_manager_win.h", | 61 "channel_transport/udp_socket2_manager_win.h", |
62 "channel_transport/udp_socket2_win.cc", | 62 "channel_transport/udp_socket2_win.cc", |
63 "channel_transport/udp_socket2_win.h", | 63 "channel_transport/udp_socket2_win.h", |
(...skipping 12 matching lines...) Expand all Loading... |
76 | 76 |
77 configs += [ | 77 configs += [ |
78 "..:common_config", | 78 "..:common_config", |
79 ":channel_transport_warnings_config", | 79 ":channel_transport_warnings_config", |
80 ] | 80 ] |
81 public_configs = [ "..:common_inherited_config" ] | 81 public_configs = [ "..:common_inherited_config" ] |
82 | 82 |
83 if (is_clang && !is_nacl) { | 83 if (is_clang && !is_nacl) { |
84 # Suppress warnings from the Chromium Clang plugin. | 84 # Suppress warnings from the Chromium Clang plugin. |
85 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 85 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
86 configs -= [ "//build/config/clang:find_bad_constructs" ] | 86 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
87 } | 87 } |
88 | 88 |
89 deps = [ | 89 deps = [ |
90 "..:webrtc_common", | 90 "..:webrtc_common", |
91 "../system_wrappers", | 91 "../system_wrappers", |
92 "//testing/gtest", | 92 "//testing/gtest", |
93 ] | 93 ] |
94 } | 94 } |
95 | 95 |
96 source_set("video_test_common") { | 96 rtc_source_set("video_test_common") { |
97 testonly = true | 97 testonly = true |
98 sources = [ | 98 sources = [ |
99 "fake_texture_frame.cc", | 99 "fake_texture_frame.cc", |
100 "fake_texture_frame.h", | 100 "fake_texture_frame.h", |
101 "frame_generator.cc", | 101 "frame_generator.cc", |
102 "frame_generator.h", | 102 "frame_generator.h", |
103 "frame_utils.cc", | 103 "frame_utils.cc", |
104 "frame_utils.h", | 104 "frame_utils.h", |
105 ] | 105 ] |
106 | 106 |
107 configs += [ "..:common_config" ] | 107 configs += [ "..:common_config" ] |
108 public_configs = [ "..:common_inherited_config" ] | 108 public_configs = [ "..:common_inherited_config" ] |
109 | 109 |
110 if (is_clang && !is_nacl) { | 110 if (is_clang && !is_nacl) { |
111 # Suppress warnings from the Chromium Clang plugin. | 111 # Suppress warnings from the Chromium Clang plugin. |
112 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 112 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
113 configs -= [ "//build/config/clang:find_bad_constructs" ] | 113 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
114 } | 114 } |
115 | 115 |
116 deps = [ | 116 deps = [ |
117 "../common_video", | 117 "../common_video", |
118 ] | 118 ] |
119 } | 119 } |
120 | 120 |
121 source_set("rtp_test_utils") { | 121 rtc_source_set("rtp_test_utils") { |
122 testonly = true | 122 testonly = true |
123 sources = [ | 123 sources = [ |
124 "rtcp_packet_parser.cc", | 124 "rtcp_packet_parser.cc", |
125 "rtcp_packet_parser.h", | 125 "rtcp_packet_parser.h", |
126 "rtp_file_reader.cc", | 126 "rtp_file_reader.cc", |
127 "rtp_file_reader.h", | 127 "rtp_file_reader.h", |
128 "rtp_file_writer.cc", | 128 "rtp_file_writer.cc", |
129 "rtp_file_writer.h", | 129 "rtp_file_writer.h", |
130 ] | 130 ] |
131 | 131 |
132 configs += [ "..:common_config" ] | 132 configs += [ "..:common_config" ] |
133 public_configs = [ "..:common_inherited_config" ] | 133 public_configs = [ "..:common_inherited_config" ] |
134 | 134 |
135 if (is_clang && !is_nacl) { | 135 if (is_clang && !is_nacl) { |
136 # Suppress warnings from the Chromium Clang plugin. | 136 # Suppress warnings from the Chromium Clang plugin. |
137 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 137 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
138 configs -= [ "//build/config/clang:find_bad_constructs" ] | 138 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
139 } | 139 } |
140 | 140 |
141 deps = [ | 141 deps = [ |
142 "..:webrtc_common", | 142 "..:webrtc_common", |
143 "../modules/rtp_rtcp", | 143 "../modules/rtp_rtcp", |
144 "//testing/gtest", | 144 "//testing/gtest", |
145 ] | 145 ] |
146 } | 146 } |
147 | 147 |
148 source_set("field_trial") { | 148 rtc_source_set("field_trial") { |
149 testonly = true | 149 testonly = true |
150 sources = [ | 150 sources = [ |
151 "field_trial.cc", | 151 "field_trial.cc", |
152 "field_trial.h", | 152 "field_trial.h", |
153 ] | 153 ] |
154 | 154 |
155 deps = [ | 155 deps = [ |
156 "..:webrtc_common", | 156 "..:webrtc_common", |
157 "../system_wrappers", | 157 "../system_wrappers", |
158 "../system_wrappers:field_trial_default", | 158 "../system_wrappers:field_trial_default", |
159 ] | 159 ] |
160 | 160 |
161 configs += [ "..:common_config" ] | 161 configs += [ "..:common_config" ] |
162 public_configs = [ "..:common_inherited_config" ] | 162 public_configs = [ "..:common_inherited_config" ] |
163 } | 163 } |
164 | 164 |
165 source_set("test_main") { | 165 rtc_source_set("test_main") { |
166 testonly = true | 166 testonly = true |
167 sources = [ | 167 sources = [ |
168 "test_main.cc", | 168 "test_main.cc", |
169 ] | 169 ] |
170 | 170 |
171 deps = [ | 171 deps = [ |
172 ":field_trial", | 172 ":field_trial", |
173 ":test_support", | 173 ":test_support", |
174 "../system_wrappers:metrics_default", | 174 "../system_wrappers:metrics_default", |
175 "//testing/gtest", | 175 "//testing/gtest", |
176 "//third_party/gflags", | 176 "//third_party/gflags", |
177 ] | 177 ] |
178 | 178 |
179 configs += [ "..:common_config" ] | 179 configs += [ "..:common_config" ] |
180 public_configs = [ "..:common_inherited_config" ] | 180 public_configs = [ "..:common_inherited_config" ] |
181 } | 181 } |
182 | 182 |
183 source_set("test_support") { | 183 rtc_source_set("test_support") { |
184 testonly = true | 184 testonly = true |
185 | 185 |
186 sources = [ | 186 sources = [ |
187 "testsupport/fileutils.cc", | 187 "testsupport/fileutils.cc", |
188 "testsupport/fileutils.h", | 188 "testsupport/fileutils.h", |
189 "testsupport/frame_reader.cc", | 189 "testsupport/frame_reader.cc", |
190 "testsupport/frame_reader.h", | 190 "testsupport/frame_reader.h", |
191 "testsupport/frame_writer.cc", | 191 "testsupport/frame_writer.cc", |
192 "testsupport/frame_writer.h", | 192 "testsupport/frame_writer.h", |
193 "testsupport/iosfileutils.mm", | 193 "testsupport/iosfileutils.mm", |
(...skipping 13 matching lines...) Expand all Loading... |
207 "../base:gtest_prod", | 207 "../base:gtest_prod", |
208 "../common_video", | 208 "../common_video", |
209 "../system_wrappers", | 209 "../system_wrappers", |
210 "//testing/gmock", | 210 "//testing/gmock", |
211 "//testing/gtest", | 211 "//testing/gtest", |
212 ] | 212 ] |
213 | 213 |
214 if (is_clang) { | 214 if (is_clang) { |
215 # Suppress warnings from the Chromium Clang plugin. | 215 # Suppress warnings from the Chromium Clang plugin. |
216 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 216 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
217 configs -= [ "//build/config/clang:find_bad_constructs" ] | 217 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
218 } | 218 } |
219 | 219 |
220 if (is_ios) { | 220 if (is_ios) { |
221 configs += [ "//build/config/compiler:enable_arc" ] | 221 configs += [ "//build/config/compiler:enable_arc" ] |
222 } | 222 } |
223 | 223 |
224 if (use_x11) { | 224 if (use_x11) { |
225 deps += [ "//tools/xdisplaycheck" ] | 225 deps += [ "//tools/xdisplaycheck" ] |
226 } | 226 } |
227 | 227 |
228 if (is_android) { | 228 if (is_android) { |
229 deps += [ "//base:base" ] | 229 deps += [ "//base:base" ] |
230 } | 230 } |
231 | 231 |
232 configs += [ "..:common_config" ] | 232 configs += [ "..:common_config" ] |
233 public_configs = [ "..:common_inherited_config" ] | 233 public_configs = [ "..:common_inherited_config" ] |
234 } | 234 } |
235 | 235 |
236 # Depend on this target when you want to have test_support but also the | 236 # Depend on this target when you want to have test_support but also the |
237 # main method needed for gtest to execute! | 237 # main method needed for gtest to execute! |
238 source_set("test_support_main") { | 238 rtc_source_set("test_support_main") { |
239 testonly = true | 239 testonly = true |
240 | 240 |
241 sources = [ | 241 sources = [ |
242 "run_all_unittests.cc", | 242 "run_all_unittests.cc", |
243 "test_suite.cc", | 243 "test_suite.cc", |
244 "test_suite.h", | 244 "test_suite.h", |
245 ] | 245 ] |
246 | 246 |
247 deps = [ | 247 deps = [ |
248 ":field_trial", | 248 ":field_trial", |
249 ":test_support", | 249 ":test_support", |
250 "../system_wrappers:metrics_default", | 250 "../system_wrappers:metrics_default", |
251 "//testing/gmock", | 251 "//testing/gmock", |
252 "//testing/gtest", | 252 "//testing/gtest", |
253 "//third_party/gflags", | 253 "//third_party/gflags", |
254 ] | 254 ] |
255 | 255 |
256 configs += [ "..:common_config" ] | 256 configs += [ "..:common_config" ] |
257 public_configs = [ "..:common_inherited_config" ] | 257 public_configs = [ "..:common_inherited_config" ] |
258 } | 258 } |
259 | 259 |
260 # Depend on this target when you want to have test_support and a special | 260 # Depend on this target when you want to have test_support and a special |
261 # main for mac which will run your test on a worker thread and consume | 261 # main for mac which will run your test on a worker thread and consume |
262 # events on the main thread. Useful if you want to access a webcam. | 262 # events on the main thread. Useful if you want to access a webcam. |
263 # This main will provide all the scaffolding and objective-c black magic | 263 # This main will provide all the scaffolding and objective-c black magic |
264 # for you. All you need to do is to implement a function in the | 264 # for you. All you need to do is to implement a function in the |
265 # run_threaded_main_mac.h file (ImplementThisToRunYourTest). | 265 # run_threaded_main_mac.h file (ImplementThisToRunYourTest). |
266 source_set("test_support_main_threaded_mac") { | 266 rtc_source_set("test_support_main_threaded_mac") { |
267 testonly = true | 267 testonly = true |
268 | 268 |
269 sources = [ | 269 sources = [ |
270 "testsupport/mac/run_threaded_main_mac.h", | 270 "testsupport/mac/run_threaded_main_mac.h", |
271 "testsupport/mac/run_threaded_main_mac.mm", | 271 "testsupport/mac/run_threaded_main_mac.mm", |
272 ] | 272 ] |
273 | 273 |
274 configs += [ "..:common_config" ] | 274 configs += [ "..:common_config" ] |
275 public_configs = [ "..:common_inherited_config" ] | 275 public_configs = [ "..:common_inherited_config" ] |
276 | 276 |
(...skipping 17 matching lines...) Expand all Loading... |
294 if (is_ios) { | 294 if (is_ios) { |
295 bundle_data("test_support_unittests_bundle_data") { | 295 bundle_data("test_support_unittests_bundle_data") { |
296 testonly = true | 296 testonly = true |
297 sources = test_support_unittests_resources | 297 sources = test_support_unittests_resources |
298 outputs = [ | 298 outputs = [ |
299 "{{bundle_resources_dir}}/{{source_file_part}}", | 299 "{{bundle_resources_dir}}/{{source_file_part}}", |
300 ] | 300 ] |
301 } | 301 } |
302 } | 302 } |
303 | 303 |
304 test("test_support_unittests") { | 304 rtc_test("test_support_unittests") { |
305 deps = [] | 305 deps = [] |
306 sources = [ | 306 sources = [ |
307 "channel_transport/udp_socket_manager_unittest.cc", | 307 "channel_transport/udp_socket_manager_unittest.cc", |
308 "channel_transport/udp_socket_wrapper_unittest.cc", | 308 "channel_transport/udp_socket_wrapper_unittest.cc", |
309 "channel_transport/udp_transport_unittest.cc", | 309 "channel_transport/udp_transport_unittest.cc", |
310 "common_unittest.cc", | 310 "common_unittest.cc", |
311 "fake_network_pipe_unittest.cc", | 311 "fake_network_pipe_unittest.cc", |
312 "frame_generator_unittest.cc", | 312 "frame_generator_unittest.cc", |
313 "rtp_file_reader_unittest.cc", | 313 "rtp_file_reader_unittest.cc", |
314 "rtp_file_writer_unittest.cc", | 314 "rtp_file_writer_unittest.cc", |
(...skipping 13 matching lines...) Expand all Loading... |
328 # TODO(jschuh): Bug 1348: fix this warning. | 328 # TODO(jschuh): Bug 1348: fix this warning. |
329 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 329 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
330 | 330 |
331 if (is_win) { | 331 if (is_win) { |
332 cflags = [ "/wd4373" ] # virtual override w/different const/volatile signat
ure. | 332 cflags = [ "/wd4373" ] # virtual override w/different const/volatile signat
ure. |
333 } | 333 } |
334 | 334 |
335 if (is_clang) { | 335 if (is_clang) { |
336 # Suppress warnings from the Chromium Clang plugin. | 336 # Suppress warnings from the Chromium Clang plugin. |
337 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 337 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
338 configs -= [ "//build/config/clang:find_bad_constructs" ] | 338 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
339 } | 339 } |
340 | 340 |
341 if (is_android) { | 341 if (is_android) { |
342 deps += [ "//testing/android/native_test:native_test_support" ] | 342 deps += [ "//testing/android/native_test:native_test_support" ] |
343 data = test_support_unittests_resources | 343 data = test_support_unittests_resources |
344 shard_timeout = 900 | 344 shard_timeout = 900 |
345 } | 345 } |
346 | 346 |
347 if (is_ios) { | 347 if (is_ios) { |
348 deps += [ ":test_support_unittests_bundle_data" ] | 348 deps += [ ":test_support_unittests_bundle_data" ] |
349 } | 349 } |
350 | 350 |
351 deps += [ | 351 deps += [ |
352 ":channel_transport", | 352 ":channel_transport", |
353 ":test_common", | 353 ":test_common", |
354 ":test_support_main", | 354 ":test_support_main", |
355 "../modules/video_capture", | 355 "../modules/video_capture", |
356 "//testing/gmock", | 356 "//testing/gmock", |
357 "//testing/gtest", | 357 "//testing/gtest", |
358 ] | 358 ] |
359 } | 359 } |
360 | 360 |
361 source_set("test_common") { | 361 rtc_source_set("test_common") { |
362 testonly = true | 362 testonly = true |
363 sources = [ | 363 sources = [ |
364 "call_test.cc", | 364 "call_test.cc", |
365 "call_test.h", | 365 "call_test.h", |
366 "configurable_frame_size_encoder.cc", | 366 "configurable_frame_size_encoder.cc", |
367 "configurable_frame_size_encoder.h", | 367 "configurable_frame_size_encoder.h", |
368 "constants.cc", | 368 "constants.cc", |
369 "constants.h", | 369 "constants.h", |
370 "direct_transport.cc", | 370 "direct_transport.cc", |
371 "direct_transport.h", | 371 "direct_transport.h", |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 "run_loop.h", | 405 "run_loop.h", |
406 ] | 406 ] |
407 } | 407 } |
408 | 408 |
409 configs += [ "..:common_config" ] | 409 configs += [ "..:common_config" ] |
410 public_configs = [ "..:common_inherited_config" ] | 410 public_configs = [ "..:common_inherited_config" ] |
411 | 411 |
412 if (is_clang && !is_nacl) { | 412 if (is_clang && !is_nacl) { |
413 # Suppress warnings from the Chromium Clang plugin. | 413 # Suppress warnings from the Chromium Clang plugin. |
414 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 414 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
415 configs -= [ "//build/config/clang:find_bad_constructs" ] | 415 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
416 } | 416 } |
417 | 417 |
418 deps = [ | 418 deps = [ |
419 ":rtp_test_utils", | 419 ":rtp_test_utils", |
420 ":test_support", | 420 ":test_support", |
421 ":video_test_common", | 421 ":video_test_common", |
422 "..:webrtc_common", | 422 "..:webrtc_common", |
423 "../audio", | 423 "../audio", |
424 "../base:rtc_base_approved", | 424 "../base:rtc_base_approved", |
425 "../call", | 425 "../call", |
(...skipping 11 matching lines...) Expand all Loading... |
437 # adds -Wall, and this flag have to be after -Wall -- so they need to | 437 # adds -Wall, and this flag have to be after -Wall -- so they need to |
438 # come from a config and cannot be on the target directly. | 438 # come from a config and cannot be on the target directly. |
439 cflags = [ | 439 cflags = [ |
440 "-Wno-bool-conversion", | 440 "-Wno-bool-conversion", |
441 "-Wno-comment", | 441 "-Wno-comment", |
442 "-Wno-delete-non-virtual-dtor", | 442 "-Wno-delete-non-virtual-dtor", |
443 ] | 443 ] |
444 } | 444 } |
445 } | 445 } |
446 | 446 |
447 source_set("test_renderer") { | 447 rtc_source_set("test_renderer") { |
448 testonly = true | 448 testonly = true |
449 libs = [] | 449 libs = [] |
450 sources = [ | 450 sources = [ |
451 "linux/glx_renderer.cc", | 451 "linux/glx_renderer.cc", |
452 "linux/glx_renderer.h", | 452 "linux/glx_renderer.h", |
453 "linux/video_renderer_linux.cc", | 453 "linux/video_renderer_linux.cc", |
454 "mac/video_renderer_mac.h", | 454 "mac/video_renderer_mac.h", |
455 "mac/video_renderer_mac.mm", | 455 "mac/video_renderer_mac.mm", |
456 "video_renderer.cc", | 456 "video_renderer.cc", |
457 "video_renderer.h", | 457 "video_renderer.h", |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
491 | 491 |
492 configs += [ "..:common_config" ] | 492 configs += [ "..:common_config" ] |
493 public_configs = [ | 493 public_configs = [ |
494 "..:common_inherited_config", | 494 "..:common_inherited_config", |
495 ":test_renderer_exported_config", | 495 ":test_renderer_exported_config", |
496 ] | 496 ] |
497 | 497 |
498 if (is_clang && !is_nacl) { | 498 if (is_clang && !is_nacl) { |
499 # Suppress warnings from the Chromium Clang plugin. | 499 # Suppress warnings from the Chromium Clang plugin. |
500 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. | 500 # See http://code.google.com/p/webrtc/issues/detail?id=163 for details. |
501 configs -= [ "//build/config/clang:find_bad_constructs" ] | 501 configs_suppressions += [ "//build/config/clang:find_bad_constructs" ] |
502 } | 502 } |
503 | 503 |
504 deps = [ | 504 deps = [ |
505 ":test_support", | 505 ":test_support", |
506 ":video_test_common", | 506 ":video_test_common", |
507 "../modules/media_file", | 507 "../modules/media_file", |
508 "//testing/gtest", | 508 "//testing/gtest", |
509 ] | 509 ] |
510 } | 510 } |
OLD | NEW |