| 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 'chromium', | 6 'chromium', |
| 7 'gclient', | 7 'gclient', |
| 8 'json', | 8 'json', |
| 9 'path', | 9 'path', |
| 10 'properties', | 10 'properties', |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 | 58 |
| 59 def GenSteps(api): | 59 def GenSteps(api): |
| 60 api.chromium.set_config('blink') | 60 api.chromium.set_config('blink') |
| 61 api.chromium.apply_config('trybot_flavor') | 61 api.chromium.apply_config('trybot_flavor') |
| 62 api.gclient.set_config('blink_internal', | 62 api.gclient.set_config('blink_internal', |
| 63 GIT_MODE=api.properties.get('GIT_MODE', False)) | 63 GIT_MODE=api.properties.get('GIT_MODE', False)) |
| 64 api.step.auto_resolve_conflicts = True | 64 api.step.auto_resolve_conflicts = True |
| 65 | 65 |
| 66 webkit_lint = api.path.build('scripts', 'slave', 'chromium', | 66 webkit_lint = api.path.build('scripts', 'slave', 'chromium', |
| 67 'lint_test_files_wrapper.py') | 67 'lint_test_files_wrapper.py') |
| 68 archive_layout_test_results = api.path.build( |
| 69 'scripts', 'slave', 'chromium', 'archive_layout_test_results.py') |
| 68 webkit_python_tests = api.path.build('scripts', 'slave', 'chromium', | 70 webkit_python_tests = api.path.build('scripts', 'slave', 'chromium', |
| 69 'test_webkitpy_wrapper.py') | 71 'test_webkitpy_wrapper.py') |
| 72 results_dir = api.path.slave_build('layout-test-results') |
| 70 | 73 |
| 71 | 74 |
| 72 def BlinkTestsStep(with_patch): | 75 def BlinkTestsStep(with_patch): |
| 73 name = 'webkit_tests (with%s patch)' % ('' if with_patch else 'out') | 76 name = 'webkit_tests (with%s patch)' % ('' if with_patch else 'out') |
| 74 test = api.path.build('scripts', 'slave', 'chromium', | 77 test = api.path.build('scripts', 'slave', 'chromium', |
| 75 'layout_test_wrapper.py') | 78 'layout_test_wrapper.py') |
| 76 args = ['--target', api.chromium.c.BUILD_CONFIG, | 79 args = ['--target', api.chromium.c.BUILD_CONFIG, |
| 77 '-o', api.path.slave_build('layout-test-results'), | 80 '-o', results_dir, |
| 78 '--build-dir', api.path.checkout(api.chromium.c.build_dir), | 81 '--build-dir', api.path.checkout(api.chromium.c.build_dir), |
| 79 api.json.test_results()] | 82 api.json.test_results()] |
| 80 return api.chromium.runtests(test, args, name=name, can_fail_build=False, | 83 return api.chromium.runtests(test, args, name=name, can_fail_build=False, |
| 81 followup_fn=followup_fn) | 84 followup_fn=followup_fn) |
| 82 | 85 |
| 83 yield ( | 86 yield ( |
| 84 api.gclient.checkout(), | 87 api.gclient.checkout(), |
| 85 api.rietveld.apply_issue('third_party', 'WebKit'), | 88 api.rietveld.apply_issue('third_party', 'WebKit'), |
| 86 api.chromium.runhooks(), | 89 api.chromium.runhooks(), |
| 87 api.chromium.compile(), | 90 api.chromium.compile(), |
| 88 api.python('webkit_lint', webkit_lint, [ | 91 api.python('webkit_lint', webkit_lint, [ |
| 89 '--build-dir', api.path.checkout('out'), | 92 '--build-dir', api.path.checkout('out'), |
| 90 '--target', api.properties['build_config']]), | 93 '--target', api.properties['build_config']]), |
| 91 api.python('webkit_python_tests', webkit_python_tests, [ | 94 api.python('webkit_python_tests', webkit_python_tests, [ |
| 92 '--build-dir', api.path.checkout('out'), | 95 '--build-dir', api.path.checkout('out'), |
| 93 '--target', api.properties['build_config'] | 96 '--target', api.properties['build_config'] |
| 94 ]), | 97 ]), |
| 95 api.chromium.runtests('webkit_unit_tests'), | 98 api.chromium.runtests('webkit_unit_tests'), |
| 96 api.chromium.runtests('weborigin_unittests'), | 99 api.chromium.runtests('weborigin_unittests'), |
| 97 api.chromium.runtests('wtf_unittests'), | 100 api.chromium.runtests('wtf_unittests'), |
| 98 ) | 101 ) |
| 99 | 102 |
| 100 yield BlinkTestsStep(with_patch=True) | 103 yield BlinkTestsStep(with_patch=True) |
| 101 if api.step_history.last_step().retcode == 0: | 104 if api.step_history.last_step().retcode == 0: |
| 102 yield api.python.inline('webkit_tests', 'print "ALL IS WELL"') | 105 yield api.python.inline('webkit_tests', 'print "ALL IS WELL"') |
| 103 return | 106 return |
| 107 with_patch = api.step_history.last_step().json.test_results |
| 104 | 108 |
| 105 with_patch = api.step_history.last_step().json.test_results | 109 buildername = api.properties['buildername'] |
| 110 buildnumber = api.properties['buildnumber'] |
| 111 def archive_webkit_tests_results_followup(step_result): |
| 112 fmt = "https://storage.googleapis.com/chromium-layout-test-archives/%s/%s/" |
| 113 step_result.presentation.links['layout_test_results'] = fmt % ( |
| 114 buildername, buildnumber) |
| 115 |
| 116 yield api.python( |
| 117 'archive_webkit_tests_results', |
| 118 archive_layout_test_results, |
| 119 [ |
| 120 '--results-dir', results_dir, |
| 121 '--build-dir', api.path.checkout(api.chromium.c.build_dir), |
| 122 '--build-number', buildnumber, |
| 123 '--builder-name', buildername, |
| 124 '--gs-bucket', 'gs://chromium-layout-test-archives', |
| 125 ] + api.json.property_args(), |
| 126 followup_fn=archive_webkit_tests_results_followup |
| 127 ) |
| 106 | 128 |
| 107 yield ( | 129 yield ( |
| 108 api.gclient.revert(), | 130 api.gclient.revert(), |
| 109 api.chromium.runhooks(), | 131 api.chromium.runhooks(), |
| 110 api.chromium.compile(), | 132 api.chromium.compile(), |
| 111 BlinkTestsStep(with_patch=False), | 133 BlinkTestsStep(with_patch=False), |
| 112 ) | 134 ) |
| 113 clean = api.step_history.last_step().json.test_results | 135 clean = api.step_history.last_step().json.test_results |
| 114 | 136 |
| 115 ignored_failures = set(clean.unexpected_failures) | 137 ignored_failures = set(clean.unexpected_failures) |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 root='src/third_party/WebKit', | 242 root='src/third_party/WebKit', |
| 221 GIT_MODE=False, | 243 GIT_MODE=False, |
| 222 ), | 244 ), |
| 223 'step_mocks': warn_on_flakey_data, | 245 'step_mocks': warn_on_flakey_data, |
| 224 'mock': { | 246 'mock': { |
| 225 'platform': { | 247 'platform': { |
| 226 'name': 'linux' | 248 'name': 'linux' |
| 227 } | 249 } |
| 228 } | 250 } |
| 229 } | 251 } |
| OLD | NEW |