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

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

Issue 1917433002: Generalize patch_project to patch root conversion. (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: gerrit test Created 4 years, 8 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 ]
11 11
12 def RunSteps(api): 12 def RunSteps(api):
13 api.gclient.use_mirror = True 13 api.gclient.use_mirror = True
14 14
15 src_cfg = api.gclient.make_config(GIT_MODE=True, CACHE_DIR='[GIT_CACHE]') 15 src_cfg = api.gclient.make_config(GIT_MODE=True, CACHE_DIR='[GIT_CACHE]')
16 soln = src_cfg.solutions.add() 16 soln = src_cfg.solutions.add()
17 soln.name = 'src' 17 soln.name = 'src'
18 soln.url = 'svn://svn.chromium.org/chrome/trunk/src' 18 soln.url = 'svn://svn.chromium.org/chrome/trunk/src'
19 soln.revision = api.properties.get('revision') 19 soln.revision = api.properties.get('revision')
20 api.gclient.c = src_cfg 20 api.gclient.c = src_cfg
21 api.gclient.c.revisions = api.properties.get('revisions', {}) 21 api.gclient.c.revisions.update(api.properties.get('revisions', {}))
22 api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision' 22 api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision'
23 api.gclient.c.patch_projects['v8'] = ('src/v8', 'HEAD')
24 api.gclient.c.patch_projects['angle/angle'] = ('src/third_party/angle', 'HEAD' )
23 patch = api.properties.get('patch', True) 25 patch = api.properties.get('patch', True)
24 clobber = True if api.properties.get('clobber') else False 26 clobber = True if api.properties.get('clobber') else False
25 force = True if api.properties.get('force') else False 27 force = True if api.properties.get('force') else False
26 no_shallow = True if api.properties.get('no_shallow') else False 28 no_shallow = True if api.properties.get('no_shallow') else False
27 output_manifest = api.properties.get('output_manifest', False) 29 output_manifest = api.properties.get('output_manifest', False)
28 with_branch_heads = api.properties.get('with_branch_heads', False) 30 with_branch_heads = api.properties.get('with_branch_heads', False)
29 refs = api.properties.get('refs', []) 31 refs = api.properties.get('refs', [])
30 oauth2 = api.properties.get('oauth2', False) 32 oauth2 = api.properties.get('oauth2', False)
31 root_solution_revision = api.properties.get('root_solution_revision') 33 root_solution_revision = api.properties.get('root_solution_revision')
32 suffix = api.properties.get('suffix') 34 suffix = api.properties.get('suffix')
33 gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False 35 gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False
36 # TODO(tandrii): remove this after transition. http://crbug.com/605563.
37 crbug605563 = ('TODO(TANDRII): REMOVE THIS TRANSITION TO patch_projects'
38 if api.properties.get('crbug605563') else None)
34 api.bot_update.ensure_checkout(force=force, 39 api.bot_update.ensure_checkout(force=force,
35 no_shallow=no_shallow, 40 no_shallow=no_shallow,
36 patch=patch, 41 patch=patch,
37 with_branch_heads=with_branch_heads, 42 with_branch_heads=with_branch_heads,
38 output_manifest=output_manifest, 43 output_manifest=output_manifest,
39 refs=refs, patch_oauth2=oauth2, 44 refs=refs, patch_oauth2=oauth2,
40 clobber=clobber, 45 clobber=clobber,
41 root_solution_revision=root_solution_revision, 46 root_solution_revision=root_solution_revision,
42 suffix=suffix, 47 suffix=suffix,
43 gerrit_no_reset=gerrit_no_reset) 48 gerrit_no_reset=gerrit_no_reset,
49 patch_root=crbug605563)
44 50
45 51
46 def GenTests(api): 52 def GenTests(api):
47 yield api.test('basic') + api.properties( 53 yield api.test('basic') + api.properties(
48 mastername='chromium.linux', 54 mastername='chromium.linux',
49 buildername='Linux Builder', 55 buildername='Linux Builder',
50 slavename='totallyaslave-m1', 56 slavename='totallyaslave-m1',
51 patch=False, 57 patch=False,
52 revision='abc' 58 revision='abc'
53 ) 59 )
(...skipping 11 matching lines...) Expand all
65 output_manifest=True, 71 output_manifest=True,
66 ) 72 )
67 yield api.test('tryjob') + api.properties( 73 yield api.test('tryjob') + api.properties(
68 mastername='tryserver.chromium.linux', 74 mastername='tryserver.chromium.linux',
69 buildername='linux_rel', 75 buildername='linux_rel',
70 slavename='totallyaslave-c4', 76 slavename='totallyaslave-c4',
71 issue=12345, 77 issue=12345,
72 patchset=654321, 78 patchset=654321,
73 patch_url='http://src.chromium.org/foo/bar' 79 patch_url='http://src.chromium.org/foo/bar'
74 ) 80 )
81 yield api.test('tryjob_crbug605563') + api.properties(
82 mastername='tryserver.chromium.linux',
83 buildername='linux_rel',
84 slavename='totallyaslave-c4',
85 issue=12345,
86 patchset=654321,
87 patch_url='http://src.chromium.org/foo/bar',
88 crbug605563=True,
89 )
75 yield api.test('trychange') + api.properties( 90 yield api.test('trychange') + api.properties(
76 mastername='tryserver.chromium.linux', 91 mastername='tryserver.chromium.linux',
77 buildername='linux_rel', 92 buildername='linux_rel',
78 slavename='totallyaslave-c4', 93 slavename='totallyaslave-c4',
79 refs=['+refs/change/1/2/333'], 94 refs=['+refs/change/1/2/333'],
80 ) 95 )
81 yield api.test('trychange_oauth2') + api.properties( 96 yield api.test('trychange_oauth2') + api.properties(
82 mastername='tryserver.chromium.linux', 97 mastername='tryserver.chromium.linux',
83 buildername='linux_rel', 98 buildername='linux_rel',
84 slavename='totallyaslave-c4', 99 slavename='totallyaslave-c4',
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 yield api.test('tryjob_v8') + api.properties( 169 yield api.test('tryjob_v8') + api.properties(
155 mastername='tryserver.chromium.linux', 170 mastername='tryserver.chromium.linux',
156 buildername='linux_rel', 171 buildername='linux_rel',
157 slavename='totallyaslave-c4', 172 slavename='totallyaslave-c4',
158 issue=12345, 173 issue=12345,
159 patchset=654321, 174 patchset=654321,
160 patch_url='http://src.chromium.org/foo/bar', 175 patch_url='http://src.chromium.org/foo/bar',
161 patch_project='v8', 176 patch_project='v8',
162 revisions={'src/v8': 'abc'} 177 revisions={'src/v8': 'abc'}
163 ) 178 )
179 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver(
180 patch_project='v8',
181 crbug605563=True,
182 )
183 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit(
184 full_project_name='angle/angle',
185 crbug605563=True,
186 )
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698