OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 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 'depot_tools/bot_update', | 6 'depot_tools/bot_update', |
7 'depot_tools/gclient', | 7 'depot_tools/gclient', |
8 'depot_tools/git', | 8 'depot_tools/git', |
9 'depot_tools/presubmit', | 9 'depot_tools/presubmit', |
10 'recipe_engine/json', | 10 'recipe_engine/json', |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 # Field event.patchSet.ref looks like 'refs/changes/11/338811/4' | 71 # Field event.patchSet.ref looks like 'refs/changes/11/338811/4' |
72 issue, patchset = api.properties['event.patchSet.ref'].split('/')[-2:] | 72 issue, patchset = api.properties['event.patchSet.ref'].split('/')[-2:] |
73 presubmit_args = [ | 73 presubmit_args = [ |
74 '--issue', issue, | 74 '--issue', issue, |
75 '--patchset', patchset, | 75 '--patchset', patchset, |
76 '--gerrit_url', api.properties['gerrit'], | 76 '--gerrit_url', api.properties['gerrit'], |
77 '--gerrit_fetch', | 77 '--gerrit_fetch', |
78 ] | 78 ] |
79 else: # pragma: no cover | 79 else: # pragma: no cover |
80 assert False, 'patch_storage %s is not supported' % patch_storage | 80 assert False, 'patch_storage %s is not supported' % patch_storage |
| 81 if api.properties.get('dry_run'): |
| 82 presubmit_args.append('--dry_run') |
81 | 83 |
82 presubmit_args.extend([ | 84 presubmit_args.extend([ |
83 '--root', abs_root, | 85 '--root', abs_root, |
84 '--commit', | 86 '--commit', |
85 '--verbose', '--verbose', | 87 '--verbose', '--verbose', |
86 '--skip_canned', 'CheckRietveldTryJobExecution', | 88 '--skip_canned', 'CheckRietveldTryJobExecution', |
87 '--skip_canned', 'CheckTreeIsOpen', | 89 '--skip_canned', 'CheckTreeIsOpen', |
88 '--skip_canned', 'CheckBuildbotPendingBuilds', | 90 '--skip_canned', 'CheckBuildbotPendingBuilds', |
89 '--upstream', upstream, # '' if not in bot_update mode. | 91 '--upstream', upstream, # '' if not in bot_update mode. |
90 ]) | 92 ]) |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 api.properties.tryserver( | 130 api.properties.tryserver( |
129 mastername='experimental.svn', | 131 mastername='experimental.svn', |
130 buildername='chromium_presubmit', | 132 buildername='chromium_presubmit', |
131 repo_name='chromium', | 133 repo_name='chromium', |
132 force_checkout=True) + | 134 force_checkout=True) + |
133 api.step_data('presubmit', api.json.output([['chromium_presubmit', | 135 api.step_data('presubmit', api.json.output([['chromium_presubmit', |
134 ['compile']]])) | 136 ['compile']]])) |
135 ) | 137 ) |
136 | 138 |
137 yield ( | 139 yield ( |
| 140 api.test('chromium_dry_run') + |
| 141 api.properties.tryserver( |
| 142 mastername='tryserver.chromium.linux', |
| 143 buildername='chromium_presubmit', |
| 144 repo_name='chromium', |
| 145 patch_project='chromium', |
| 146 dry_run=True) + |
| 147 api.step_data('presubmit', api.json.output([['chromium_presubmit', |
| 148 ['compile']]])) |
| 149 ) |
| 150 |
| 151 yield ( |
138 api.test('chromium_with_auth') + | 152 api.test('chromium_with_auth') + |
139 api.properties.tryserver( | 153 api.properties.tryserver( |
140 mastername='tryserver.chromium.linux', | 154 mastername='tryserver.chromium.linux', |
141 buildername='chromium_presubmit', | 155 buildername='chromium_presubmit', |
142 repo_name='chromium', | 156 repo_name='chromium', |
143 codereview_auth=True, | 157 codereview_auth=True, |
144 patch_project='chromium') + | 158 patch_project='chromium') + |
145 api.step_data('presubmit', api.json.output([['chromium_presubmit', | 159 api.step_data('presubmit', api.json.output([['chromium_presubmit', |
146 ['compile']]])) | 160 ['compile']]])) |
147 ) | 161 ) |
(...skipping 26 matching lines...) Expand all Loading... |
174 api.test('recipes-py') + | 188 api.test('recipes-py') + |
175 api.properties.tryserver( | 189 api.properties.tryserver( |
176 mastername='tryserver.infra', | 190 mastername='tryserver.infra', |
177 buildername='infra_presubmit', | 191 buildername='infra_presubmit', |
178 repo_name='recipes_py', | 192 repo_name='recipes_py', |
179 patch_project='recipes-py', | 193 patch_project='recipes-py', |
180 runhooks=True) + | 194 runhooks=True) + |
181 api.step_data('presubmit', api.json.output([['infra_presubmit', | 195 api.step_data('presubmit', api.json.output([['infra_presubmit', |
182 ['compile']]])) | 196 ['compile']]])) |
183 ) | 197 ) |
OLD | NEW |