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

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: -line long 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',
25 'HEAD')
23 patch = api.properties.get('patch', True) 26 patch = api.properties.get('patch', True)
24 clobber = True if api.properties.get('clobber') else False 27 clobber = True if api.properties.get('clobber') else False
25 force = True if api.properties.get('force') else False 28 force = True if api.properties.get('force') else False
26 no_shallow = True if api.properties.get('no_shallow') else False 29 no_shallow = True if api.properties.get('no_shallow') else False
27 output_manifest = api.properties.get('output_manifest', False) 30 output_manifest = api.properties.get('output_manifest', False)
28 with_branch_heads = api.properties.get('with_branch_heads', False) 31 with_branch_heads = api.properties.get('with_branch_heads', False)
29 refs = api.properties.get('refs', []) 32 refs = api.properties.get('refs', [])
30 oauth2 = api.properties.get('oauth2', False) 33 oauth2 = api.properties.get('oauth2', False)
31 root_solution_revision = api.properties.get('root_solution_revision') 34 root_solution_revision = api.properties.get('root_solution_revision')
32 suffix = api.properties.get('suffix') 35 suffix = api.properties.get('suffix')
33 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 # TODO(tandrii): remove this after transition. http://crbug.com/605563.
38 crbug605563 = ('TODO(TANDRII): REMOVE THIS TRANSITION TO patch_projects'
39 if api.properties.get('crbug605563') else None)
34 api.bot_update.ensure_checkout(force=force, 40 api.bot_update.ensure_checkout(force=force,
35 no_shallow=no_shallow, 41 no_shallow=no_shallow,
36 patch=patch, 42 patch=patch,
37 with_branch_heads=with_branch_heads, 43 with_branch_heads=with_branch_heads,
38 output_manifest=output_manifest, 44 output_manifest=output_manifest,
39 refs=refs, patch_oauth2=oauth2, 45 refs=refs, patch_oauth2=oauth2,
40 clobber=clobber, 46 clobber=clobber,
41 root_solution_revision=root_solution_revision, 47 root_solution_revision=root_solution_revision,
42 suffix=suffix, 48 suffix=suffix,
43 gerrit_no_reset=gerrit_no_reset) 49 gerrit_no_reset=gerrit_no_reset,
50 patch_root=crbug605563)
44 51
45 52
46 def GenTests(api): 53 def GenTests(api):
47 yield api.test('basic') + api.properties( 54 yield api.test('basic') + api.properties(
48 mastername='chromium.linux', 55 mastername='chromium.linux',
49 buildername='Linux Builder', 56 buildername='Linux Builder',
50 slavename='totallyaslave-m1', 57 slavename='totallyaslave-m1',
51 patch=False, 58 patch=False,
52 revision='abc' 59 revision='abc'
53 ) 60 )
(...skipping 11 matching lines...) Expand all
65 output_manifest=True, 72 output_manifest=True,
66 ) 73 )
67 yield api.test('tryjob') + api.properties( 74 yield api.test('tryjob') + api.properties(
68 mastername='tryserver.chromium.linux', 75 mastername='tryserver.chromium.linux',
69 buildername='linux_rel', 76 buildername='linux_rel',
70 slavename='totallyaslave-c4', 77 slavename='totallyaslave-c4',
71 issue=12345, 78 issue=12345,
72 patchset=654321, 79 patchset=654321,
73 patch_url='http://src.chromium.org/foo/bar' 80 patch_url='http://src.chromium.org/foo/bar'
74 ) 81 )
82 yield api.test('tryjob_crbug605563') + api.properties(
83 mastername='tryserver.chromium.linux',
84 buildername='linux_rel',
85 slavename='totallyaslave-c4',
86 issue=12345,
87 patchset=654321,
88 patch_url='http://src.chromium.org/foo/bar',
89 crbug605563=True,
90 )
75 yield api.test('trychange') + api.properties( 91 yield api.test('trychange') + api.properties(
76 mastername='tryserver.chromium.linux', 92 mastername='tryserver.chromium.linux',
77 buildername='linux_rel', 93 buildername='linux_rel',
78 slavename='totallyaslave-c4', 94 slavename='totallyaslave-c4',
79 refs=['+refs/change/1/2/333'], 95 refs=['+refs/change/1/2/333'],
80 ) 96 )
81 yield api.test('trychange_oauth2') + api.properties( 97 yield api.test('trychange_oauth2') + api.properties(
82 mastername='tryserver.chromium.linux', 98 mastername='tryserver.chromium.linux',
83 buildername='linux_rel', 99 buildername='linux_rel',
84 slavename='totallyaslave-c4', 100 slavename='totallyaslave-c4',
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 yield api.test('tryjob_v8') + api.properties( 170 yield api.test('tryjob_v8') + api.properties(
155 mastername='tryserver.chromium.linux', 171 mastername='tryserver.chromium.linux',
156 buildername='linux_rel', 172 buildername='linux_rel',
157 slavename='totallyaslave-c4', 173 slavename='totallyaslave-c4',
158 issue=12345, 174 issue=12345,
159 patchset=654321, 175 patchset=654321,
160 patch_url='http://src.chromium.org/foo/bar', 176 patch_url='http://src.chromium.org/foo/bar',
161 patch_project='v8', 177 patch_project='v8',
162 revisions={'src/v8': 'abc'} 178 revisions={'src/v8': 'abc'}
163 ) 179 )
180 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver(
181 patch_project='v8',
182 crbug605563=True,
183 )
184 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit(
185 full_project_name='angle/angle',
186 crbug605563=True,
187 )
OLDNEW
« no previous file with comments | « recipe_modules/bot_update/api.py ('k') | recipe_modules/bot_update/example.expected/gerrit_no_reset.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698