OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Utility class to build the chromium master BuildFactory's. | 5 """Utility class to build the chromium master BuildFactory's. |
6 | 6 |
7 Based on gclient_factory.py and adds chromium-specific steps.""" | 7 Based on gclient_factory.py and adds chromium-specific steps.""" |
8 | 8 |
9 import os | 9 import os |
10 import re | 10 import re |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
254 nohooks_on_update=nohooks_on_update, | 254 nohooks_on_update=nohooks_on_update, |
255 target_os=target_os) | 255 target_os=target_os) |
256 | 256 |
257 def _AddTests(self, factory_cmd_obj, tests, mode=None, | 257 def _AddTests(self, factory_cmd_obj, tests, mode=None, |
258 factory_properties=None): | 258 factory_properties=None): |
259 """Add the tests listed in 'tests' to the factory_cmd_obj.""" | 259 """Add the tests listed in 'tests' to the factory_cmd_obj.""" |
260 factory_properties = factory_properties or {} | 260 factory_properties = factory_properties or {} |
261 tests = (tests or [])[:] | 261 tests = (tests or [])[:] |
262 | 262 |
263 # This function is too crowded, try to simplify it a little. | 263 # This function is too crowded, try to simplify it a little. |
264 def R(test): | 264 def R(*testnames): |
265 if gclient_factory.ShouldRunTest(tests, test): | 265 for test in testnames: |
266 tests.remove(test) | 266 if gclient_factory.ShouldRunTest(tests, test): |
267 return True | 267 tests.remove(test) |
268 return True | |
268 f = factory_cmd_obj | 269 f = factory_cmd_obj |
269 fp = factory_properties | 270 fp = factory_properties |
270 | 271 |
271 # Copy perf expectations from slave to master for use later. | 272 # Copy perf expectations from slave to master for use later. |
272 if factory_properties.get('expectations'): | 273 if factory_properties.get('expectations'): |
273 f.AddUploadPerfExpectations(factory_properties) | 274 f.AddUploadPerfExpectations(factory_properties) |
274 | 275 |
275 # When modifying the order of the tests here, please take | 276 # When modifying the order of the tests here, please take |
276 # http://build.chromium.org/buildbot/waterfall/stats into account. | 277 # http://build.chromium.org/buildbot/waterfall/stats into account. |
277 # Tests that fail more often should be earlier in the queue. | 278 # Tests that fail more often should be earlier in the queue. |
(...skipping 25 matching lines...) Expand all Loading... | |
303 if R('check_perms'): | 304 if R('check_perms'): |
304 f.AddCheckPermsStep() | 305 f.AddCheckPermsStep() |
305 if R('check_perms_br'): | 306 if R('check_perms_br'): |
306 f.AddBuildrunnerCheckPermsStep() | 307 f.AddBuildrunnerCheckPermsStep() |
307 if R('check_licenses'): | 308 if R('check_licenses'): |
308 f.AddCheckLicensesStep(fp) | 309 f.AddCheckLicensesStep(fp) |
309 if R('check_licenses_br'): | 310 if R('check_licenses_br'): |
310 f.AddBuildrunnerCheckLicensesStep(fp) | 311 f.AddBuildrunnerCheckLicensesStep(fp) |
311 | 312 |
312 # Small ("module") unit tests: | 313 # Small ("module") unit tests: |
313 if R('base'): | 314 if R('base', 'base_unittests'): |
314 f.AddAnnotatedGTestTestStep('base_unittests', fp) | 315 f.AddAnnotatedGTestTestStep('base_unittests', fp) |
315 if R('base_br'): | 316 if R('base_br'): |
316 f.AddBuildrunnerGTest('base_unittests', fp) | 317 f.AddBuildrunnerGTest('base_unittests', fp) |
317 if R('cacheinvalidation'): | 318 if R('cacheinvalidation', 'cacheinvalidation_unittests'): |
318 f.AddAnnotatedGTestTestStep('cacheinvalidation_unittests', fp) | 319 f.AddAnnotatedGTestTestStep('cacheinvalidation_unittests', fp) |
319 if R('cacheinvalidation_br'): | 320 if R('cacheinvalidation_br'): |
320 f.AddBuildrunnerGTest('cacheinvalidation_unittests', fp) | 321 f.AddBuildrunnerGTest('cacheinvalidation_unittests', fp) |
321 if R('cc_unittests'): | 322 if R('cc_unittests'): |
322 f.AddAnnotatedGTestTestStep('cc_unittests', fp) | 323 f.AddAnnotatedGTestTestStep('cc_unittests', fp) |
323 if R('cc_unittests_br'): | 324 if R('cc_unittests_br'): |
324 f.AddBuildrunnerGTest('cc_unittests', fp) | 325 f.AddBuildrunnerGTest('cc_unittests', fp) |
325 if R('chromeos_unittests'): | 326 if R('chromeos_unittests'): |
326 f.AddAnnotatedGTestTestStep('chromeos_unittests', fp) | 327 f.AddAnnotatedGTestTestStep('chromeos_unittests', fp) |
327 if R('courgette'): | 328 if R('courgette'): |
328 f.AddAnnotatedGTestTestStep('courgette_unittests', fp) | 329 f.AddAnnotatedGTestTestStep('courgette_unittests', fp) |
329 if R('courgette_br'): | 330 if R('courgette_br'): |
330 f.AddBuildrunnerGTest('courgette_unittests', fp) | 331 f.AddBuildrunnerGTest('courgette_unittests', fp) |
331 if R('crypto'): | 332 if R('crypto', 'crypto_unittests'): |
332 f.AddAnnotatedGTestTestStep('crypto_unittests', fp) | 333 f.AddAnnotatedGTestTestStep('crypto_unittests', fp) |
333 if R('crypto_br'): | 334 if R('crypto_br'): |
334 f.AddBuildrunnerGTest('crypto_unittests', fp) | 335 f.AddBuildrunnerGTest('crypto_unittests', fp) |
335 if R('dbus'): | 336 if R('dbus'): |
336 f.AddAnnotatedGTestTestStep('dbus_unittests', fp) | 337 f.AddAnnotatedGTestTestStep('dbus_unittests', fp) |
337 if R('dbus_br'): | 338 if R('dbus_br'): |
338 f.AddBuildrunnerGTest('dbus_unittests', fp) | 339 f.AddBuildrunnerGTest('dbus_unittests', fp) |
339 if R('googleurl'): | 340 if R('googleurl', 'googleurl_unittests'): |
340 f.AddAnnotatedGTestTestStep('googleurl_unittests', fp) | 341 f.AddAnnotatedGTestTestStep('googleurl_unittests', fp) |
341 if R('googleurl_br'): | 342 if R('googleurl_br'): |
342 f.AddBuildrunnerGTest('googleurl_unittests', fp) | 343 f.AddBuildrunnerGTest('googleurl_unittests', fp) |
343 if R('gpu'): | 344 if R('gpu', 'gpu_unittests'): |
344 f.AddAnnotatedGTestTestStep( | 345 f.AddAnnotatedGTestTestStep( |
345 'gpu_unittests', fp, arg_list=['--gmock_verbose=error']) | 346 'gpu_unittests', fp, arg_list=['--gmock_verbose=error']) |
346 if R('gpu_br'): | 347 if R('gpu_br'): |
347 f.AddBuildrunnerGTest( | 348 f.AddBuildrunnerGTest( |
348 'gpu_unittests', fp, arg_list=['--gmock_verbose=error']) | 349 'gpu_unittests', fp, arg_list=['--gmock_verbose=error']) |
349 if R('jingle'): | 350 if R('jingle', 'jingle_unittests'): |
350 f.AddAnnotatedGTestTestStep('jingle_unittests', fp) | 351 f.AddAnnotatedGTestTestStep('jingle_unittests', fp) |
351 if R('jingle_br'): | 352 if R('jingle_br'): |
352 f.AddBuildrunnerGTest('jingle_unittests', fp) | 353 f.AddBuildrunnerGTest('jingle_unittests', fp) |
353 if R('content_unittests'): | 354 if R('content_unittests'): |
354 f.AddAnnotatedGTestTestStep('content_unittests', fp) | 355 f.AddAnnotatedGTestTestStep('content_unittests', fp) |
355 if R('content_unittests_br'): | 356 if R('content_unittests_br'): |
356 f.AddBuildrunnerGTest('content_unittests', fp) | 357 f.AddBuildrunnerGTest('content_unittests', fp) |
357 if R('device_unittests'): | 358 if R('device_unittests'): |
358 f.AddAnnotatedGTestTestStep('device_unittests', fp) | 359 f.AddAnnotatedGTestTestStep('device_unittests', fp) |
359 if R('device_unittests_br'): | 360 if R('device_unittests_br'): |
360 f.AddBuildrunnerGTest('device_unittests', fp) | 361 f.AddBuildrunnerGTest('device_unittests', fp) |
361 if R('media'): | 362 if R('media', 'media_unittests'): |
362 f.AddAnnotatedGTestTestStep('media_unittests', fp) | 363 f.AddAnnotatedGTestTestStep('media_unittests', fp) |
363 if R('media_br'): | 364 if R('media_br'): |
364 f.AddBuildrunnerGTest('media_unittests', fp) | 365 f.AddBuildrunnerGTest('media_unittests', fp) |
365 if R('net'): | 366 if R('net', 'net_unittests'): |
366 f.AddAnnotatedGTestTestStep('net_unittests', fp) | 367 f.AddAnnotatedGTestTestStep('net_unittests', fp) |
367 if R('net_br'): | 368 if R('net_br'): |
368 f.AddBuildrunnerGTest('net_unittests', fp) | 369 f.AddBuildrunnerGTest('net_unittests', fp) |
369 if R('ppapi_unittests'): | 370 if R('ppapi_unittests'): |
370 f.AddAnnotatedGTestTestStep('ppapi_unittests', fp) | 371 f.AddAnnotatedGTestTestStep('ppapi_unittests', fp) |
371 if R('ppapi_unittests_br'): | 372 if R('ppapi_unittests_br'): |
372 f.AddBuildrunnerGTest('ppapi_unittests', fp) | 373 f.AddBuildrunnerGTest('ppapi_unittests', fp) |
373 if R('printing'): | 374 if R('printing', 'printing_unittests'): |
374 f.AddAnnotatedGTestTestStep('printing_unittests', fp) | 375 f.AddAnnotatedGTestTestStep('printing_unittests', fp) |
375 if R('printing_br'): | 376 if R('printing_br'): |
376 f.AddBuildrunnerGTest('printing_unittests', fp) | 377 f.AddBuildrunnerGTest('printing_unittests', fp) |
377 if R('remoting'): | 378 if R('remoting', 'remoting_unittests'): |
378 f.AddAnnotatedGTestTestStep('remoting_unittests', fp) | 379 f.AddAnnotatedGTestTestStep('remoting_unittests', fp) |
379 if R('remoting_br'): | 380 if R('remoting_br'): |
380 f.AddBuildrunnerGTest('remoting_unittests', fp) | 381 f.AddBuildrunnerGTest('remoting_unittests', fp) |
381 if R('test_shell'): | 382 if R('test_shell'): |
382 f.AddAnnotatedGTestTestStep('test_shell_tests', fp) | 383 f.AddAnnotatedGTestTestStep('test_shell_tests', fp) |
383 if R('test_shell_br'): | 384 if R('test_shell_br'): |
384 f.AddBuildrunnerGTest('test_shell_tests', fp) | 385 f.AddBuildrunnerGTest('test_shell_tests', fp) |
385 # Windows sandbox | 386 # Windows sandbox |
386 if R('sandbox'): | 387 if R('sandbox'): |
387 f.AddAnnotatedGTestTestStep('sbox_unittests', fp) | 388 f.AddAnnotatedGTestTestStep('sbox_unittests', fp) |
(...skipping 21 matching lines...) Expand all Loading... | |
409 if R('aura_br'): | 410 if R('aura_br'): |
410 f.AddBuildrunnerGTest('aura_unittests', fp) | 411 f.AddBuildrunnerGTest('aura_unittests', fp) |
411 if R('aura_shell') or R('ash') or R('ash_unittests'): | 412 if R('aura_shell') or R('ash') or R('ash_unittests'): |
412 f.AddAnnotatedGTestTestStep('ash_unittests', fp) | 413 f.AddAnnotatedGTestTestStep('ash_unittests', fp) |
413 if R('compositor'): | 414 if R('compositor'): |
414 f.AddAnnotatedGTestTestStep('compositor_unittests', fp) | 415 f.AddAnnotatedGTestTestStep('compositor_unittests', fp) |
415 if R('compositor_br'): | 416 if R('compositor_br'): |
416 f.AddBuildrunnerGTest('compositor_unittests', fp) | 417 f.AddBuildrunnerGTest('compositor_unittests', fp) |
417 | 418 |
418 # Medium-sized tests (unit and browser): | 419 # Medium-sized tests (unit and browser): |
419 if R('unit'): | 420 if R('unit', 'unit_tests'): |
420 f.AddAnnotatedChromeUnitTests(fp) | 421 f.AddAnnotatedChromeUnitTests(fp) |
421 if R('unit_br'): | 422 if R('unit_br'): |
M-A Ruel
2012/11/28 14:05:42
These ones too.
iannucci
2012/11/28 19:17:11
Hm... The point of the change was to make the test
| |
422 f.AddBuildrunnerChromeUnitTests(fp) | 423 f.AddBuildrunnerChromeUnitTests(fp) |
423 # A snapshot of the "ChromeUnitTests" available for individual selection | 424 # A snapshot of the "ChromeUnitTests" available for individual selection |
424 if R('unit_ipc'): | 425 if R('unit_ipc'): |
425 f.AddAnnotatedGTestTestStep('ipc_tests', fp) | 426 f.AddAnnotatedGTestTestStep('ipc_tests', fp) |
426 if R('unit_ipc_br'): | 427 if R('unit_ipc_br'): |
427 f.AddBuildrunnerGTest('ipc_tests', fp) | 428 f.AddBuildrunnerGTest('ipc_tests', fp) |
428 if R('unit_sync'): | 429 if R('unit_sync'): |
429 f.AddAnnotatedGTestTestStep('sync_unit_tests', fp) | 430 f.AddAnnotatedGTestTestStep('sync_unit_tests', fp) |
430 if R('unit_sync_br'): | 431 if R('unit_sync_br'): |
431 f.AddBuildrunnerGTest('sync_unit_tests', fp) | 432 f.AddBuildrunnerGTest('sync_unit_tests', fp) |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1264 build_dir=web_build_dir) | 1265 build_dir=web_build_dir) |
1265 chromium_cmd_obj.AddChromebotServer(factory_properties) | 1266 chromium_cmd_obj.AddChromebotServer(factory_properties) |
1266 chromium_cmd_obj.AddReliabilityTests(client_os) | 1267 chromium_cmd_obj.AddReliabilityTests(client_os) |
1267 elif slave_type == 'ChromebotClient': | 1268 elif slave_type == 'ChromebotClient': |
1268 chromium_cmd_obj.AddGetBuildForChromebot(client_os, | 1269 chromium_cmd_obj.AddGetBuildForChromebot(client_os, |
1269 extract=True, | 1270 extract=True, |
1270 build_url=build_url) | 1271 build_url=build_url) |
1271 chromium_cmd_obj.AddChromebotClient(factory_properties) | 1272 chromium_cmd_obj.AddChromebotClient(factory_properties) |
1272 | 1273 |
1273 return factory | 1274 return factory |
OLD | NEW |