| 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 ] |
| (...skipping 17 matching lines...) Expand all Loading... |
| 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_rebase_patch_ref = bool(api.properties.get('gerrit_rebase_patch_ref')) |
| 38 api.bot_update.ensure_checkout( | 38 |
| 39 force=force, | 39 if api.properties.get('test_apply_gerrit_ref'): |
| 40 no_shallow=no_shallow, | 40 api.bot_update.apply_gerrit_ref( |
| 41 patch=patch, | 41 root='/tmp/test/root', |
| 42 with_branch_heads=with_branch_heads, | 42 gerrit_no_reset=gerrit_no_reset, |
| 43 output_manifest=output_manifest, | 43 gerrit_rebase_patch_ref=gerrit_rebase_patch_ref) |
| 44 refs=refs, patch_oauth2=oauth2, | 44 else: |
| 45 clobber=clobber, | 45 api.bot_update.ensure_checkout( |
| 46 root_solution_revision=root_solution_revision, | 46 force=force, |
| 47 suffix=suffix, | 47 no_shallow=no_shallow, |
| 48 gerrit_no_reset=gerrit_no_reset, | 48 patch=patch, |
| 49 gerrit_rebase_patch_ref=gerrit_rebase_patch_ref) | 49 with_branch_heads=with_branch_heads, |
| 50 output_manifest=output_manifest, |
| 51 refs=refs, patch_oauth2=oauth2, |
| 52 clobber=clobber, |
| 53 root_solution_revision=root_solution_revision, |
| 54 suffix=suffix, |
| 55 gerrit_no_reset=gerrit_no_reset, |
| 56 gerrit_rebase_patch_ref=gerrit_rebase_patch_ref) |
| 50 | 57 |
| 51 | 58 |
| 52 def GenTests(api): | 59 def GenTests(api): |
| 53 yield api.test('basic') + api.properties( | 60 yield api.test('basic') + api.properties( |
| 54 mastername='chromium.linux', | 61 mastername='chromium.linux', |
| 55 buildername='Linux Builder', | 62 buildername='Linux Builder', |
| 56 slavename='totallyaslave-m1', | 63 slavename='totallyaslave-m1', |
| 57 patch=False, | 64 patch=False, |
| 58 revision='abc' | 65 revision='abc' |
| 59 ) | 66 ) |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 buildername='Experimental Builder', | 163 buildername='Experimental Builder', |
| 157 slavename='somehost', | 164 slavename='somehost', |
| 158 gerrit_no_reset=1 | 165 gerrit_no_reset=1 |
| 159 ) | 166 ) |
| 160 yield api.test('gerrit_rebase_patch_ref') + api.properties( | 167 yield api.test('gerrit_rebase_patch_ref') + api.properties( |
| 161 mastername='experimental', | 168 mastername='experimental', |
| 162 buildername='Experimental Builder', | 169 buildername='Experimental Builder', |
| 163 slavename='somehost', | 170 slavename='somehost', |
| 164 gerrit_rebase_patch_ref=True | 171 gerrit_rebase_patch_ref=True |
| 165 ) | 172 ) |
| 173 yield api.test('apply_gerrit_ref') + api.properties( |
| 174 repository='chromium', |
| 175 gerrit_rebase_patch_ref=True, |
| 176 gerrit_no_reset=1, |
| 177 test_apply_gerrit_ref=True, |
| 178 ) |
| 166 yield api.test('tryjob_v8') + api.properties( | 179 yield api.test('tryjob_v8') + api.properties( |
| 167 mastername='tryserver.chromium.linux', | 180 mastername='tryserver.chromium.linux', |
| 168 buildername='linux_rel', | 181 buildername='linux_rel', |
| 169 slavename='totallyaslave-c4', | 182 slavename='totallyaslave-c4', |
| 170 issue=12345, | 183 issue=12345, |
| 171 patchset=654321, | 184 patchset=654321, |
| 172 patch_url='http://src.chromium.org/foo/bar', | 185 patch_url='http://src.chromium.org/foo/bar', |
| 173 patch_project='v8', | 186 patch_project='v8', |
| 174 revisions={'src/v8': 'abc'} | 187 revisions={'src/v8': 'abc'} |
| 175 ) | 188 ) |
| 176 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( | 189 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( |
| 177 patch_project='v8', | 190 patch_project='v8', |
| 178 ) | 191 ) |
| 179 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( | 192 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( |
| 180 full_project_name='angle/angle', | 193 full_project_name='angle/angle', |
| 181 ) | 194 ) |
| OLD | NEW |