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

Side by Side Diff: recipe_modules/bot_update/example.py

Issue 2298883002: Make rebase and sync the default for Gerrit updates (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
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 'gclient', 7 'gclient',
8 'recipe_engine/path', 8 'recipe_engine/path',
9 'recipe_engine/properties', 9 'recipe_engine/properties',
10 ] 10 ]
(...skipping 16 matching lines...) Expand all
27 clobber = True if api.properties.get('clobber') else False 27 clobber = True if api.properties.get('clobber') else False
28 force = True if api.properties.get('force') else False 28 force = True if api.properties.get('force') else False
29 no_shallow = True if api.properties.get('no_shallow') else False 29 no_shallow = True if api.properties.get('no_shallow') else False
30 output_manifest = api.properties.get('output_manifest', False) 30 output_manifest = api.properties.get('output_manifest', False)
31 with_branch_heads = api.properties.get('with_branch_heads', False) 31 with_branch_heads = api.properties.get('with_branch_heads', False)
32 refs = api.properties.get('refs', []) 32 refs = api.properties.get('refs', [])
33 oauth2 = api.properties.get('oauth2', False) 33 oauth2 = api.properties.get('oauth2', False)
34 root_solution_revision = api.properties.get('root_solution_revision') 34 root_solution_revision = api.properties.get('root_solution_revision')
35 suffix = api.properties.get('suffix') 35 suffix = api.properties.get('suffix')
36 gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False 36 gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False
37 gerrit_rebase_patch_ref = bool(api.properties.get('gerrit_rebase_patch_ref')) 37 gerrit_no_rebase_patch_ref = bool(
38 api.properties.get('gerrit_no_rebase_patch_ref'))
38 39
39 if api.properties.get('test_apply_gerrit_ref'): 40 if api.properties.get('test_apply_gerrit_ref'):
40 api.bot_update.apply_gerrit_ref( 41 api.bot_update.apply_gerrit_ref(
41 root='/tmp/test/root', 42 root='/tmp/test/root',
42 gerrit_no_reset=gerrit_no_reset, 43 gerrit_no_reset=gerrit_no_reset,
43 gerrit_rebase_patch_ref=gerrit_rebase_patch_ref) 44 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref)
44 else: 45 else:
45 api.bot_update.ensure_checkout( 46 api.bot_update.ensure_checkout(
46 force=force, 47 force=force,
47 no_shallow=no_shallow, 48 no_shallow=no_shallow,
48 patch=patch, 49 patch=patch,
49 with_branch_heads=with_branch_heads, 50 with_branch_heads=with_branch_heads,
50 output_manifest=output_manifest, 51 output_manifest=output_manifest,
51 refs=refs, patch_oauth2=oauth2, 52 refs=refs, patch_oauth2=oauth2,
52 clobber=clobber, 53 clobber=clobber,
53 root_solution_revision=root_solution_revision, 54 root_solution_revision=root_solution_revision,
54 suffix=suffix, 55 suffix=suffix,
55 gerrit_no_reset=gerrit_no_reset, 56 gerrit_no_reset=gerrit_no_reset,
56 gerrit_rebase_patch_ref=gerrit_rebase_patch_ref) 57 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref)
57 58
58 59
59 def GenTests(api): 60 def GenTests(api):
60 yield api.test('basic') + api.properties( 61 yield api.test('basic') + api.properties(
61 mastername='chromium.linux', 62 mastername='chromium.linux',
62 buildername='Linux Builder', 63 buildername='Linux Builder',
63 slavename='totallyaslave-m1', 64 slavename='totallyaslave-m1',
64 patch=False, 65 patch=False,
65 revision='abc' 66 revision='abc'
66 ) 67 )
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 buildername='Experimental Builder', 152 buildername='Experimental Builder',
152 slavename='somehost', 153 slavename='somehost',
153 root_solution_revision='revision', 154 root_solution_revision='revision',
154 ) 155 )
155 yield api.test('gerrit_no_reset') + api.properties( 156 yield api.test('gerrit_no_reset') + api.properties(
156 mastername='experimental', 157 mastername='experimental',
157 buildername='Experimental Builder', 158 buildername='Experimental Builder',
158 slavename='somehost', 159 slavename='somehost',
159 gerrit_no_reset=1 160 gerrit_no_reset=1
160 ) 161 )
161 yield api.test('gerrit_rebase_patch_ref') + api.properties( 162 yield api.test('gerrit_no_rebase_patch_ref') + api.properties(
162 mastername='experimental', 163 mastername='experimental',
163 buildername='Experimental Builder', 164 buildername='Experimental Builder',
164 slavename='somehost', 165 slavename='somehost',
165 gerrit_rebase_patch_ref=True 166 gerrit_no_rebase_patch_ref=True
166 ) 167 )
167 yield api.test('apply_gerrit_ref') + api.properties( 168 yield api.test('apply_gerrit_ref') + api.properties(
168 repository='chromium', 169 repository='chromium',
169 gerrit_rebase_patch_ref=True, 170 gerrit_no_rebase_patch_ref=True,
170 gerrit_no_reset=1, 171 gerrit_no_reset=1,
171 test_apply_gerrit_ref=True, 172 test_apply_gerrit_ref=True,
172 ) 173 )
173 yield api.test('tryjob_v8') + api.properties( 174 yield api.test('tryjob_v8') + api.properties(
174 mastername='tryserver.chromium.linux', 175 mastername='tryserver.chromium.linux',
175 buildername='linux_rel', 176 buildername='linux_rel',
176 slavename='totallyaslave-c4', 177 slavename='totallyaslave-c4',
177 issue=12345, 178 issue=12345,
178 patchset=654321, 179 patchset=654321,
179 patch_url='http://src.chromium.org/foo/bar', 180 patch_url='http://src.chromium.org/foo/bar',
180 patch_project='v8', 181 patch_project='v8',
181 revisions={'src/v8': 'abc'} 182 revisions={'src/v8': 'abc'}
182 ) 183 )
183 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( 184 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver(
184 patch_project='v8', 185 patch_project='v8',
185 ) 186 )
186 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( 187 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit(
187 full_project_name='angle/angle', 188 full_project_name='angle/angle',
188 ) 189 )
OLDNEW
« no previous file with comments | « recipe_modules/bot_update/api.py ('k') | recipe_modules/bot_update/example.expected/apply_gerrit_ref.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698