Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(380)

Side by Side Diff: scripts/slave/recipes/run_presubmit.py

Issue 2280153003: Remove svn test from run_presubmit recipe module (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | scripts/slave/recipes/run_presubmit.expected/fake_svn_master.json » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 21 matching lines...) Expand all
32 kwargs['gerrit_rebase_patch_ref'] = True 32 kwargs['gerrit_rebase_patch_ref'] = True
33 bot_update_step = api.bot_update.ensure_checkout( 33 bot_update_step = api.bot_update.ensure_checkout(
34 force=force_checkout, 34 force=force_checkout,
35 patch_oauth2=codereview_auth, 35 patch_oauth2=codereview_auth,
36 **kwargs) 36 **kwargs)
37 relative_root = api.gclient.calculate_patch_root( 37 relative_root = api.gclient.calculate_patch_root(
38 api.properties['patch_project']).rstrip('/') 38 api.properties['patch_project']).rstrip('/')
39 got_revision_property = api.gclient.c.got_revision_mapping[relative_root] 39 got_revision_property = api.gclient.c.got_revision_mapping[relative_root]
40 upstream = bot_update_step.json.output['properties'].get( 40 upstream = bot_update_step.json.output['properties'].get(
41 got_revision_property) 41 got_revision_property)
42 if (not upstream or
43 isinstance(upstream, int) or
44 (upstream.isdigit() and len(upstream) < 40)):
45 # If got_revision is an svn revision, then use got_revision_git.
46 upstream = bot_update_step.json.output['properties'].get(
47 '%s_git' % got_revision_property) or ''
48 42
49 abs_root = api.path['slave_build'].join(relative_root) 43 abs_root = api.path['slave_build'].join(relative_root)
50 # TODO(hinoka): Extract email/name from issue? 44 # TODO(hinoka): Extract email/name from issue?
51 api.git('-c', 'user.email=commit-bot@chromium.org', 45 api.git('-c', 'user.email=commit-bot@chromium.org',
52 '-c', 'user.name=The Commit Bot', 46 '-c', 'user.name=The Commit Bot',
53 'commit', '-a', '-m', 'Committed patch', 47 'commit', '-a', '-m', 'Committed patch',
54 name='commit git patch', cwd=abs_root) 48 name='commit git patch', cwd=abs_root)
55 49
56 if api.properties.get('runhooks'): 50 if api.properties.get('runhooks'):
57 api.gclient.runhooks() 51 api.gclient.runhooks()
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 api.properties.tryserver( 127 api.properties.tryserver(
134 mastername='tryserver.chromium.linux', 128 mastername='tryserver.chromium.linux',
135 buildername='%s_presubmit' % repo_name, 129 buildername='%s_presubmit' % repo_name,
136 repo_name=repo_name, 130 repo_name=repo_name,
137 patch_project=repo_name) + 131 patch_project=repo_name) +
138 api.step_data('presubmit', api.json.output([['%s_presubmit' % repo_name, 132 api.step_data('presubmit', api.json.output([['%s_presubmit' % repo_name,
139 ['compile']]])) 133 ['compile']]]))
140 ) 134 )
141 135
142 yield ( 136 yield (
143 api.test('fake_svn_master') +
144 api.properties.tryserver(
145 mastername='experimental.svn',
146 buildername='chromium_presubmit',
147 repo_name='chromium',
148 force_checkout=True) +
149 api.step_data('presubmit', api.json.output([['chromium_presubmit',
150 ['compile']]]))
151 )
152
153 yield (
154 api.test('chromium_dry_run') + 137 api.test('chromium_dry_run') +
155 api.properties.tryserver( 138 api.properties.tryserver(
156 mastername='tryserver.chromium.linux', 139 mastername='tryserver.chromium.linux',
157 buildername='chromium_presubmit', 140 buildername='chromium_presubmit',
158 repo_name='chromium', 141 repo_name='chromium',
159 patch_project='chromium', 142 patch_project='chromium',
160 dry_run=True) + 143 dry_run=True) +
161 api.step_data('presubmit', api.json.output([['chromium_presubmit', 144 api.step_data('presubmit', api.json.output([['chromium_presubmit',
162 ['compile']]])) 145 ['compile']]]))
163 ) 146 )
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 217
235 yield ( 218 yield (
236 api.test('presubmit-infra-failure') + 219 api.test('presubmit-infra-failure') +
237 api.properties.tryserver( 220 api.properties.tryserver(
238 mastername='tryserver.chromium.linux', 221 mastername='tryserver.chromium.linux',
239 buildername='chromium_presubmit', 222 buildername='chromium_presubmit',
240 repo_name='chromium', 223 repo_name='chromium',
241 patch_project='chromium') + 224 patch_project='chromium') +
242 api.step_data('presubmit', api.json.output({}, retcode=2)) 225 api.step_data('presubmit', api.json.output({}, retcode=2))
243 ) 226 )
OLDNEW
« no previous file with comments | « no previous file | scripts/slave/recipes/run_presubmit.expected/fake_svn_master.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698