Chromium Code Reviews| 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 = ['step', 'chromium', 'step_history', 'path', 'gclient', 'rietveld', | 5 DEPS = ['python', 'chromium', 'step_history', 'path', 'gclient', 'rietveld', |
|
agable
2013/06/25 15:55:28
Can we please sort these DEPS everywhere?
iannucci
2013/06/25 21:22:09
Done.
| |
| 6 'properties', 'json'] | 6 'properties', 'json', 'step'] |
| 7 | 7 |
| 8 def GenSteps(api): | 8 def GenSteps(api): |
| 9 api.chromium.set_config('blink') | 9 api.chromium.set_config('blink', GIT_MODE=True) |
| 10 api.chromium.apply_config('trybot_flavor') | 10 api.chromium.apply_config('trybot_flavor') |
| 11 api.step.auto_resolve_conflicts = True | 11 api.step.auto_resolve_conflicts = True |
| 12 | 12 |
| 13 webkit_lint = api.path.build('scripts', 'slave', 'chromium', | 13 webkit_lint = api.path.build('scripts', 'slave', 'chromium', |
| 14 'lint_test_files_wrapper.py') | 14 'lint_test_files_wrapper.py') |
| 15 | 15 |
| 16 def BlinkTestsStep(with_patch): | 16 def BlinkTestsStep(with_patch): |
| 17 name = 'webkit_tests (with%s patch)' % ('' if with_patch else 'out') | 17 name = 'webkit_tests (with%s patch)' % ('' if with_patch else 'out') |
| 18 test = api.path.build('scripts', 'slave', 'chromium', | 18 test = api.path.build('scripts', 'slave', 'chromium', |
| 19 'layout_test_wrapper.py') | 19 'layout_test_wrapper.py') |
| 20 args = ['--target', api.chromium.c.BUILD_CONFIG, | 20 args = ['--target', api.chromium.c.BUILD_CONFIG, |
| 21 '-o', api.path.slave_build('layout-test-results'), | 21 '-o', api.path.slave_build('layout-test-results'), |
| 22 '--build-dir', api.path.checkout(api.chromium.c.build_dir), | 22 '--build-dir', api.path.checkout(api.chromium.c.build_dir), |
| 23 api.json.output()] | 23 api.json.output()] |
| 24 return api.chromium.runtests(test, args, name=name, can_fail_build=False) | 24 return api.chromium.runtests(test, args, name=name, can_fail_build=False) |
| 25 | 25 |
| 26 yield ( | 26 yield ( |
| 27 api.gclient.checkout(), | 27 api.gclient.checkout(), |
| 28 api.rietveld.apply_issue('third_party', 'WebKit'), | 28 api.rietveld.apply_issue('third_party', 'WebKit'), |
| 29 api.chromium.runhooks(), | 29 api.chromium.runhooks(), |
| 30 api.chromium.compile(), | 30 api.chromium.compile(), |
| 31 api.chromium.runtests('webkit_unit_tests'), | 31 api.chromium.runtests('webkit_unit_tests'), |
| 32 api.step('webkit_lint', [ | 32 api.python('webkit_lint', webkit_lint, [ |
| 33 'python', webkit_lint, '--build-dir', api.path.checkout('out'), | 33 '--build-dir', api.path.checkout('out'), |
| 34 '--target', api.properties['build_config']]), | 34 '--target', api.properties['build_config']]) |
| 35 ) | 35 ) |
| 36 | 36 |
| 37 yield BlinkTestsStep(with_patch=True) | 37 yield BlinkTestsStep(with_patch=True) |
| 38 if api.step_history.last_step().retcode == 0: | 38 if api.step_history.last_step().retcode == 0: |
| 39 yield api.step('webkit_tests', ['python', '-c', 'print "ALL IS WELL"']) | 39 yield api.python.inline('webkit_tests', 'print "ALL IS WELL"') |
| 40 return | 40 return |
| 41 | 41 |
| 42 failing_tests = api.step_history.last_step().json.output | 42 failing_tests = api.step_history.last_step().json.output |
| 43 | 43 |
| 44 yield ( | 44 yield ( |
| 45 api.gclient.revert(), | 45 api.gclient.revert(), |
| 46 api.chromium.runhooks(), | 46 api.chromium.runhooks(), |
| 47 api.chromium.compile(), | 47 api.chromium.compile(), |
| 48 BlinkTestsStep(with_patch=False), | 48 BlinkTestsStep(with_patch=False), |
| 49 ) | 49 ) |
| 50 base_failing_tests = api.step_history.last_step().json.output | 50 base_failing_tests = api.step_history.last_step().json.output |
| 51 | 51 |
| 52 final_script = ['python', | 52 yield api.python( |
| 53 'webkit_tests', | |
| 53 api.path.checkout('third_party', 'WebKit', 'Tools', 'Scripts', | 54 api.path.checkout('third_party', 'WebKit', 'Tools', 'Scripts', |
| 54 'print-json-test-results'), | 55 'print-json-test-results'), |
| 55 '--ignored-failures-path', api.json.input(base_failing_tests), | 56 ['--ignored-failures-path', api.json.input(base_failing_tests), |
| 56 api.json.input(failing_tests), | 57 api.json.input(failing_tests)] |
| 57 ] | 58 ) |
| 58 yield api.step('webkit_tests', final_script) | |
| 59 | 59 |
| 60 | 60 |
| 61 def GenTests(api): | 61 def GenTests(api): |
| 62 SUCCESS_DATA = lambda: {} | 62 SUCCESS_DATA = lambda: {} |
| 63 | 63 |
| 64 FAIL_DATA = lambda: { | 64 FAIL_DATA = lambda: { |
| 65 'webkit_tests (with patch)': { | 65 'webkit_tests (with patch)': { |
| 66 'json': {'output': {'crazy': ['data', 'format']}}, | 66 'json': {'output': {'crazy': ['data', 'format']}}, |
| 67 '$R': 1 | 67 '$R': 1 |
| 68 }, | 68 }, |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 81 config_name='blink', | 81 config_name='blink', |
| 82 root='src/third_party/WebKit', | 82 root='src/third_party/WebKit', |
| 83 ), | 83 ), |
| 84 'step_mocks': step_mocks(), | 84 'step_mocks': step_mocks(), |
| 85 'mock': { | 85 'mock': { |
| 86 'platform': { | 86 'platform': { |
| 87 'name': plat | 87 'name': plat |
| 88 } | 88 } |
| 89 } | 89 } |
| 90 } | 90 } |
| OLD | NEW |