OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 DEPS = [ | 5 DEPS = [ |
6 'bot_update', | 6 'bot_update', |
7 'chromium', | 7 'chromium', |
8 'gclient', | 8 'gclient', |
9 'json', | 9 'json', |
10 'path', | 10 'path', |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 api.step.auto_resolve_conflicts = True | 361 api.step.auto_resolve_conflicts = True |
362 | 362 |
363 if 'oilpan' in buildername: | 363 if 'oilpan' in buildername: |
364 api.chromium.apply_config('oilpan') | 364 api.chromium.apply_config('oilpan') |
365 | 365 |
366 webkit_lint = api.path['build'].join('scripts', 'slave', 'chromium', | 366 webkit_lint = api.path['build'].join('scripts', 'slave', 'chromium', |
367 'lint_test_files_wrapper.py') | 367 'lint_test_files_wrapper.py') |
368 webkit_python_tests = api.path['build'].join('scripts', 'slave', 'chromium', | 368 webkit_python_tests = api.path['build'].join('scripts', 'slave', 'chromium', |
369 'test_webkitpy_wrapper.py') | 369 'test_webkitpy_wrapper.py') |
370 | 370 |
371 root = bot_config.get('root_override', api.rietveld.calculate_issue_root()) | 371 yield api.bot_update.ensure_checkout(force=True) |
372 | |
373 yield api.bot_update.ensure_checkout() | |
374 # The first time we run bot update, remember if bot_update mode is on or off. | |
375 bot_update_mode = api.step_history.last_step().json.output['did_run'] | |
376 if not bot_update_mode: | |
377 yield api.gclient.checkout( | |
378 revert=True, can_fail_build=False, abort_on_failure=False) | |
379 for step in api.step_history.values(): | |
380 if step.retcode != 0: | |
381 # TODO(phajdan.jr): Remove the workaround, http://crbug.com/357767 . | |
382 yield ( | |
383 api.path.rmcontents('slave build directory', api.path['slave_build']), | |
384 api.gclient.checkout(), | |
385 ) | |
386 break | |
387 yield api.rietveld.apply_issue(root) | |
388 | |
389 yield ( | 372 yield ( |
390 api.chromium.runhooks(), | 373 api.chromium.runhooks(), |
391 api.chromium.compile(abort_on_failure=False, can_fail_build=False), | 374 api.chromium.compile(), |
392 ) | 375 ) |
393 | 376 |
394 if api.step_history['compile'].retcode != 0: | |
395 # TODO(phajdan.jr): Remove the workaround, http://crbug.com/357767 . | |
396 if api.platform.is_win: | |
397 yield api.chromium.taskkill() | |
398 yield api.path.rmcontents('slave build directory', api.path['slave_build']) | |
399 if bot_update_mode: | |
400 yield api.bot_update.ensure_checkout() | |
401 else: | |
402 yield ( | |
403 api.gclient.checkout(revert=False), | |
404 api.rietveld.apply_issue(root), | |
405 ) | |
406 yield ( | |
407 api.chromium.runhooks(), | |
408 api.chromium.compile(), | |
409 ) | |
410 | |
411 if not bot_config['compile_only']: | 377 if not bot_config['compile_only']: |
412 yield ( | 378 yield ( |
413 api.python('webkit_lint', webkit_lint, [ | 379 api.python('webkit_lint', webkit_lint, [ |
414 '--build-dir', api.path['checkout'].join('out'), | 380 '--build-dir', api.path['checkout'].join('out'), |
415 '--target', api.chromium.c.BUILD_CONFIG | 381 '--target', api.chromium.c.BUILD_CONFIG |
416 ]), | 382 ]), |
417 api.python('webkit_python_tests', webkit_python_tests, [ | 383 api.python('webkit_python_tests', webkit_python_tests, [ |
418 '--build-dir', api.path['checkout'].join('out'), | 384 '--build-dir', api.path['checkout'].join('out'), |
419 '--target', api.chromium.c.BUILD_CONFIG, | 385 '--target', api.chromium.c.BUILD_CONFIG, |
420 ]), | 386 ]), |
421 api.chromium.runtest('webkit_unit_tests', xvfb=True), | 387 api.chromium.runtest('webkit_unit_tests', xvfb=True), |
422 api.chromium.runtest('blink_platform_unittests'), | 388 api.chromium.runtest('blink_platform_unittests'), |
423 api.chromium.runtest('blink_heap_unittests'), | 389 api.chromium.runtest('blink_heap_unittests'), |
424 api.chromium.runtest('wtf_unittests'), | 390 api.chromium.runtest('wtf_unittests'), |
425 ) | 391 ) |
426 | 392 |
427 if not bot_config['compile_only']: | 393 if not bot_config['compile_only']: |
428 def deapply_patch_fn(_failing_steps): | 394 def deapply_patch_fn(_failing_steps): |
429 if bot_update_mode: | 395 yield api.bot_update.ensure_checkout(patch=False, always_run=True) |
430 yield api.bot_update.ensure_checkout(patch=False, always_run=True) | |
431 else: | |
432 yield api.gclient.checkout(revert=True, always_run=True) | |
433 | 396 |
434 yield ( | 397 yield ( |
435 api.chromium.runhooks(always_run=True), | 398 api.chromium.runhooks(always_run=True), |
436 api.chromium.compile(always_run=True), | 399 api.chromium.compile(always_run=True), |
437 ) | 400 ) |
438 | 401 |
439 yield api.test_utils.determine_new_failures([BlinkTest()], deapply_patch_fn) | 402 yield api.test_utils.determine_new_failures([BlinkTest()], deapply_patch_fn) |
440 | 403 |
441 | 404 |
442 def _sanitize_nonalpha(text): | 405 def _sanitize_nonalpha(text): |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 # that we fail the whole build. | 449 # that we fail the whole build. |
487 yield ( | 450 yield ( |
488 api.test('minimal_pass_continues') + | 451 api.test('minimal_pass_continues') + |
489 properties('tryserver.blink', 'linux_blink_rel') + | 452 properties('tryserver.blink', 'linux_blink_rel') + |
490 api.override_step_data(with_patch, canned_test(passing=False)) + | 453 api.override_step_data(with_patch, canned_test(passing=False)) + |
491 api.override_step_data(without_patch, | 454 api.override_step_data(without_patch, |
492 canned_test(passing=True, minimal=True)) | 455 canned_test(passing=True, minimal=True)) |
493 ) | 456 ) |
494 | 457 |
495 yield ( | 458 yield ( |
496 api.test('gclient_revert_nuke') + | |
497 properties('tryserver.blink', 'linux_blink_no_bot_update') + | |
498 api.step_data('gclient revert', retcode=1) + | |
499 api.override_step_data(with_patch, canned_test(passing=True, minimal=True)) | |
500 ) | |
501 | |
502 yield ( | |
503 api.test('preamble_test_failure') + | 459 api.test('preamble_test_failure') + |
504 properties('tryserver.blink', 'linux_blink_rel') + | 460 properties('tryserver.blink', 'linux_blink_rel') + |
505 api.step_data('webkit_unit_tests', retcode=1) | 461 api.step_data('webkit_unit_tests', retcode=1) |
506 ) | 462 ) |
507 | 463 |
508 # This tests what happens if something goes horribly wrong in | 464 # This tests what happens if something goes horribly wrong in |
509 # run-webkit-tests and we return an internal error; the step should | 465 # run-webkit-tests and we return an internal error; the step should |
510 # be considered a hard failure and we shouldn't try to compare the | 466 # be considered a hard failure and we shouldn't try to compare the |
511 # lists of failing tests. | 467 # lists of failing tests. |
512 # 255 == test_run_results.UNEXPECTED_ERROR_EXIT_STATUS in run-webkit-tests. | 468 # 255 == test_run_results.UNEXPECTED_ERROR_EXIT_STATUS in run-webkit-tests. |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 # and compare the lists of failing tests). | 507 # and compare the lists of failing tests). |
552 yield ( | 508 yield ( |
553 api.test('too_many_failures_for_retcode') + | 509 api.test('too_many_failures_for_retcode') + |
554 properties('tryserver.blink', 'linux_blink_rel') + | 510 properties('tryserver.blink', 'linux_blink_rel') + |
555 api.override_step_data(with_patch, | 511 api.override_step_data(with_patch, |
556 canned_test(passing=False, | 512 canned_test(passing=False, |
557 num_additional_failures=125)) + | 513 num_additional_failures=125)) + |
558 api.override_step_data(without_patch, | 514 api.override_step_data(without_patch, |
559 canned_test(passing=True, minimal=True)) | 515 canned_test(passing=True, minimal=True)) |
560 ) | 516 ) |
OLD | NEW |