Chromium Code Reviews| OLD | NEW |
|---|---|
| 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(CACHE_DIR='[GIT_CACHE]') | 15 src_cfg = api.gclient.make_config(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 = 'https://chromium.googlesource.com/chromium/src.git' | 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 gerrit_no_rebase_patch_ref = bool( | 36 gerrit_no_rebase_patch_ref = bool( |
| 38 api.properties.get('gerrit_no_rebase_patch_ref')) | 37 api.properties.get('gerrit_no_rebase_patch_ref')) |
| 39 | 38 |
| 40 if api.properties.get('test_apply_gerrit_ref'): | 39 if api.properties.get('test_apply_gerrit_ref'): |
| 41 api.bot_update.apply_gerrit_ref( | 40 api.bot_update.apply_gerrit_ref( |
| 42 root='/tmp/test/root', | 41 root='/tmp/test/root', |
| 43 gerrit_no_reset=gerrit_no_reset, | 42 gerrit_no_reset=gerrit_no_reset, |
| 44 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) | 43 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) |
| 45 else: | 44 else: |
| 46 api.bot_update.ensure_checkout( | 45 api.bot_update.ensure_checkout( |
| 47 force=force, | |
| 48 no_shallow=no_shallow, | 46 no_shallow=no_shallow, |
| 49 patch=patch, | 47 patch=patch, |
| 50 with_branch_heads=with_branch_heads, | 48 with_branch_heads=with_branch_heads, |
| 51 output_manifest=output_manifest, | 49 output_manifest=output_manifest, |
| 52 refs=refs, patch_oauth2=oauth2, | 50 refs=refs, patch_oauth2=oauth2, |
| 53 clobber=clobber, | 51 clobber=clobber, |
| 54 root_solution_revision=root_solution_revision, | 52 root_solution_revision=root_solution_revision, |
| 55 suffix=suffix, | 53 suffix=suffix, |
| 56 gerrit_no_reset=gerrit_no_reset, | 54 gerrit_no_reset=gerrit_no_reset, |
| 57 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) | 55 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 117 ) + api.step_data('bot_update', retcode=88) | 115 ) + api.step_data('bot_update', retcode=88) |
| 118 yield api.test('tryjob_fail_patch_download') + api.properties( | 116 yield api.test('tryjob_fail_patch_download') + api.properties( |
| 119 mastername='tryserver.chromium.linux', | 117 mastername='tryserver.chromium.linux', |
| 120 buildername='linux_rel', | 118 buildername='linux_rel', |
| 121 slavename='totallyaslave-c4', | 119 slavename='totallyaslave-c4', |
| 122 issue=12345, | 120 issue=12345, |
| 123 patchset=654321, | 121 patchset=654321, |
| 124 patch_url='http://src.chromium.org/foo/bar', | 122 patch_url='http://src.chromium.org/foo/bar', |
| 125 fail_patch='download' | 123 fail_patch='download' |
| 126 ) + api.step_data('bot_update', retcode=87) | 124 ) + api.step_data('bot_update', retcode=87) |
| 127 yield api.test('forced') + api.properties( | 125 yield api.test('forced') + api.properties( |
|
estaab
2016/09/03 01:52:25
Drop this one now?
iannucci
2016/09/07 19:21:42
Done
| |
| 128 mastername='experimental', | 126 mastername='experimental', |
| 129 buildername='Experimental Builder', | 127 buildername='Experimental Builder', |
| 130 slavename='somehost', | 128 slavename='somehost', |
| 131 force=1 | 129 force=1 |
| 132 ) | 130 ) |
| 133 yield api.test('no_shallow') + api.properties( | 131 yield api.test('no_shallow') + api.properties( |
| 134 mastername='experimental', | 132 mastername='experimental', |
| 135 buildername='Experimental Builder', | 133 buildername='Experimental Builder', |
| 136 slavename='somehost', | 134 slavename='somehost', |
| 137 no_shallow=1 | 135 no_shallow=1 |
| 138 ) | 136 ) |
| 139 yield api.test('off') + api.properties( | 137 yield api.test('off') + api.properties( |
|
estaab
2016/09/03 01:52:25
Maybe this one too?
iannucci
2016/09/07 19:21:42
Done
| |
| 140 mastername='experimental', | 138 mastername='experimental', |
| 141 buildername='Experimental Builder', | 139 buildername='Experimental Builder', |
| 142 slavename='somehost', | 140 slavename='somehost', |
| 143 ) | 141 ) |
| 144 yield api.test('clobber') + api.properties( | 142 yield api.test('clobber') + api.properties( |
| 145 mastername='experimental', | 143 mastername='experimental', |
| 146 buildername='Experimental Builder', | 144 buildername='Experimental Builder', |
| 147 slavename='somehost', | 145 slavename='somehost', |
| 148 clobber=1 | 146 clobber=1 |
| 149 ) | 147 ) |
| (...skipping 30 matching lines...) Expand all Loading... | |
| 180 patch_url='http://src.chromium.org/foo/bar', | 178 patch_url='http://src.chromium.org/foo/bar', |
| 181 patch_project='v8', | 179 patch_project='v8', |
| 182 revisions={'src/v8': 'abc'} | 180 revisions={'src/v8': 'abc'} |
| 183 ) | 181 ) |
| 184 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( | 182 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( |
| 185 patch_project='v8', | 183 patch_project='v8', |
| 186 ) | 184 ) |
| 187 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( | 185 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( |
| 188 full_project_name='angle/angle', | 186 full_project_name='angle/angle', |
| 189 ) | 187 ) |
| OLD | NEW |