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

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

Issue 1954833002: Add bot_update_lite into recipes (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Also lite Created 4 years, 6 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 = 'https://chromium.googlesource.com/chromium/src.git'
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.update(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') 23 api.gclient.c.patch_projects['v8'] = ('src/v8', 'HEAD')
24 api.gclient.c.patch_projects['angle/angle'] = ('src/third_party/angle', 24 api.gclient.c.patch_projects['angle/angle'] = ('src/third_party/angle',
25 'HEAD') 25 'HEAD')
26 patch = api.properties.get('patch', True) 26 patch = api.properties.get('patch', True)
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
29 no_shallow = True if api.properties.get('no_shallow') else False 28 no_shallow = True if api.properties.get('no_shallow') else False
30 output_manifest = api.properties.get('output_manifest', False) 29 output_manifest = api.properties.get('output_manifest', False)
31 with_branch_heads = api.properties.get('with_branch_heads', False) 30 with_branch_heads = api.properties.get('with_branch_heads', False)
32 refs = api.properties.get('refs', []) 31 refs = api.properties.get('refs', [])
33 oauth2 = api.properties.get('oauth2', False) 32 oauth2 = api.properties.get('oauth2', False)
34 root_solution_revision = api.properties.get('root_solution_revision') 33 root_solution_revision = api.properties.get('root_solution_revision')
35 suffix = api.properties.get('suffix') 34 suffix = api.properties.get('suffix')
36 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
37 api.bot_update.ensure_checkout(force=force, 36 api.bot_update.ensure_checkout(no_shallow=no_shallow,
38 no_shallow=no_shallow,
39 patch=patch, 37 patch=patch,
40 with_branch_heads=with_branch_heads, 38 with_branch_heads=with_branch_heads,
41 output_manifest=output_manifest, 39 output_manifest=output_manifest,
42 refs=refs, patch_oauth2=oauth2, 40 refs=refs, patch_oauth2=oauth2,
43 clobber=clobber, 41 clobber=clobber,
44 root_solution_revision=root_solution_revision, 42 root_solution_revision=root_solution_revision,
45 suffix=suffix, 43 suffix=suffix,
46 gerrit_no_reset=gerrit_no_reset) 44 gerrit_no_reset=gerrit_no_reset)
47 45
48 46
49 def GenTests(api): 47 def GenTests(api):
50 yield api.test('basic') + api.properties( 48 yield api.test('basic') + api.properties(
51 mastername='chromium.linux',
52 buildername='Linux Builder',
53 slavename='totallyaslave-m1',
54 patch=False, 49 patch=False,
55 revision='abc' 50 revision='abc'
56 ) 51 )
57 yield api.test('basic_with_branch_heads') + api.properties( 52 yield api.test('basic_with_branch_heads') + api.properties(
58 mastername='chromium.linux',
59 buildername='Linux Builder',
60 slavename='totallyaslave-m1',
61 with_branch_heads=True, 53 with_branch_heads=True,
62 suffix='with branch heads' 54 suffix='with branch heads'
63 ) 55 )
64 yield api.test('basic_output_manifest') + api.properties( 56 yield api.test('basic_output_manifest') + api.properties(
65 mastername='chromium.linux',
66 buildername='Linux Builder',
67 slavename='totallyaslave-m1',
68 output_manifest=True, 57 output_manifest=True,
69 ) 58 )
70 yield api.test('tryjob') + api.properties( 59 yield api.test('tryjob') + api.properties(
71 mastername='tryserver.chromium.linux',
72 buildername='linux_rel',
73 slavename='totallyaslave-c4',
74 issue=12345, 60 issue=12345,
75 patchset=654321, 61 patchset=654321,
76 patch_url='http://src.chromium.org/foo/bar' 62 patch_url='http://src.chromium.org/foo/bar'
77 ) 63 )
78 yield api.test('trychange') + api.properties( 64 yield api.test('trychange') + api.properties(
79 mastername='tryserver.chromium.linux',
80 buildername='linux_rel',
81 slavename='totallyaslave-c4',
82 refs=['+refs/change/1/2/333'], 65 refs=['+refs/change/1/2/333'],
83 ) 66 )
84 yield api.test('trychange_oauth2') + api.properties( 67 yield api.test('trychange_oauth2') + api.properties(
85 mastername='tryserver.chromium.linux',
86 buildername='linux_rel',
87 slavename='totallyaslave-c4',
88 oauth2=True, 68 oauth2=True,
89 ) 69 )
90 yield api.test('tryjob_fail') + api.properties( 70 yield api.test('tryjob_fail') + api.properties(
91 mastername='tryserver.chromium.linux',
92 buildername='linux_rel',
93 slavename='totallyaslave-c4',
94 issue=12345, 71 issue=12345,
95 patchset=654321, 72 patchset=654321,
96 patch_url='http://src.chromium.org/foo/bar', 73 patch_url='http://src.chromium.org/foo/bar',
97 ) + api.step_data('bot_update', retcode=1) 74 ) + api.step_data('bot_update', retcode=1)
98 yield api.test('tryjob_fail_patch') + api.properties( 75 yield api.test('tryjob_fail_patch') + api.properties(
99 mastername='tryserver.chromium.linux',
100 buildername='linux_rel',
101 slavename='totallyaslave-c4',
102 issue=12345, 76 issue=12345,
103 patchset=654321, 77 patchset=654321,
104 patch_url='http://src.chromium.org/foo/bar', 78 patch_url='http://src.chromium.org/foo/bar',
105 fail_patch='apply', 79 fail_patch='apply',
106 ) + api.step_data('bot_update', retcode=88) 80 ) + api.step_data('bot_update', retcode=88)
107 yield api.test('tryjob_fail_patch_download') + api.properties( 81 yield api.test('tryjob_fail_patch_download') + api.properties(
108 mastername='tryserver.chromium.linux',
109 buildername='linux_rel',
110 slavename='totallyaslave-c4',
111 issue=12345, 82 issue=12345,
112 patchset=654321, 83 patchset=654321,
113 patch_url='http://src.chromium.org/foo/bar', 84 patch_url='http://src.chromium.org/foo/bar',
114 fail_patch='download' 85 fail_patch='download'
115 ) + api.step_data('bot_update', retcode=87) 86 ) + api.step_data('bot_update', retcode=87)
116 yield api.test('forced') + api.properties(
117 mastername='experimental',
118 buildername='Experimental Builder',
119 slavename='somehost',
120 force=1
121 )
122 yield api.test('no_shallow') + api.properties( 87 yield api.test('no_shallow') + api.properties(
123 mastername='experimental',
124 buildername='Experimental Builder',
125 slavename='somehost',
126 no_shallow=1 88 no_shallow=1
127 ) 89 )
128 yield api.test('off') + api.properties(
129 mastername='experimental',
130 buildername='Experimental Builder',
131 slavename='somehost',
132 )
133 yield api.test('svn_mode') + api.properties(
134 mastername='experimental.svn',
135 buildername='Experimental SVN Builder',
136 slavename='somehost',
137 force=1
138 )
139 yield api.test('clobber') + api.properties( 90 yield api.test('clobber') + api.properties(
140 mastername='experimental',
141 buildername='Experimental Builder',
142 slavename='somehost',
143 clobber=1 91 clobber=1
144 ) 92 )
145 yield api.test('reset_root_solution_revision') + api.properties( 93 yield api.test('reset_root_solution_revision') + api.properties(
146 mastername='experimental',
147 buildername='Experimental Builder',
148 slavename='somehost',
149 root_solution_revision='revision', 94 root_solution_revision='revision',
150 ) 95 )
151 yield api.test('gerrit_no_reset') + api.properties( 96 yield api.test('gerrit_no_reset') + api.properties(
152 mastername='experimental',
153 buildername='Experimental Builder',
154 slavename='somehost',
155 gerrit_no_reset=1 97 gerrit_no_reset=1
156 ) 98 )
157 yield api.test('tryjob_v8') + api.properties( 99 yield api.test('tryjob_v8') + api.properties(
158 mastername='tryserver.chromium.linux',
159 buildername='linux_rel',
160 slavename='totallyaslave-c4',
161 issue=12345, 100 issue=12345,
162 patchset=654321, 101 patchset=654321,
163 patch_url='http://src.chromium.org/foo/bar', 102 patch_url='http://src.chromium.org/foo/bar',
164 patch_project='v8', 103 patch_project='v8',
165 revisions={'src/v8': 'abc'} 104 revisions={'src/v8': 'abc'}
166 ) 105 )
167 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( 106 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver(
168 patch_project='v8', 107 patch_project='v8',
169 ) 108 )
170 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( 109 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit(
171 full_project_name='angle/angle', 110 full_project_name='angle/angle',
172 ) 111 )
OLDNEW
« no previous file with comments | « recipe_modules/bot_update_lite/api.py ('k') | recipe_modules/bot_update_lite/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698