| 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 13 matching lines...) Expand all Loading... |
| 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 | 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 oauth2_json = api.properties.get('oauth2_json', None) |
| 34 root_solution_revision = api.properties.get('root_solution_revision') | 35 root_solution_revision = api.properties.get('root_solution_revision') |
| 35 suffix = api.properties.get('suffix') | 36 suffix = api.properties.get('suffix') |
| 36 gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False | 37 gerrit_no_reset = True if api.properties.get('gerrit_no_reset') else False |
| 37 gerrit_no_rebase_patch_ref = bool( | 38 gerrit_no_rebase_patch_ref = bool( |
| 38 api.properties.get('gerrit_no_rebase_patch_ref')) | 39 api.properties.get('gerrit_no_rebase_patch_ref')) |
| 39 | 40 |
| 40 if api.properties.get('test_apply_gerrit_ref'): | 41 if api.properties.get('test_apply_gerrit_ref'): |
| 41 api.bot_update.apply_gerrit_ref( | 42 api.bot_update.apply_gerrit_ref( |
| 42 root='/tmp/test/root', | 43 root='/tmp/test/root', |
| 43 gerrit_no_reset=gerrit_no_reset, | 44 gerrit_no_reset=gerrit_no_reset, |
| 44 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) | 45 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) |
| 45 else: | 46 else: |
| 46 api.bot_update.ensure_checkout( | 47 api.bot_update.ensure_checkout( |
| 47 force=force, | 48 force=force, |
| 48 no_shallow=no_shallow, | 49 no_shallow=no_shallow, |
| 49 patch=patch, | 50 patch=patch, |
| 50 with_branch_heads=with_branch_heads, | 51 with_branch_heads=with_branch_heads, |
| 51 output_manifest=output_manifest, | 52 output_manifest=output_manifest, |
| 52 refs=refs, patch_oauth2=oauth2, | 53 refs=refs, patch_oauth2=oauth2, |
| 54 oauth2_json=oauth2_json, |
| 53 clobber=clobber, | 55 clobber=clobber, |
| 54 root_solution_revision=root_solution_revision, | 56 root_solution_revision=root_solution_revision, |
| 55 suffix=suffix, | 57 suffix=suffix, |
| 56 gerrit_no_reset=gerrit_no_reset, | 58 gerrit_no_reset=gerrit_no_reset, |
| 57 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) | 59 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) |
| 58 | 60 |
| 59 | 61 |
| 60 def GenTests(api): | 62 def GenTests(api): |
| 61 yield api.test('basic') + api.properties( | 63 yield api.test('basic') + api.properties( |
| 62 mastername='chromium.linux', | 64 mastername='chromium.linux', |
| (...skipping 28 matching lines...) Expand all Loading... |
| 91 buildername='linux_rel', | 93 buildername='linux_rel', |
| 92 slavename='totallyaslave-c4', | 94 slavename='totallyaslave-c4', |
| 93 refs=['+refs/change/1/2/333'], | 95 refs=['+refs/change/1/2/333'], |
| 94 ) | 96 ) |
| 95 yield api.test('trychange_oauth2') + api.properties( | 97 yield api.test('trychange_oauth2') + api.properties( |
| 96 mastername='tryserver.chromium.linux', | 98 mastername='tryserver.chromium.linux', |
| 97 buildername='linux_rel', | 99 buildername='linux_rel', |
| 98 slavename='totallyaslave-c4', | 100 slavename='totallyaslave-c4', |
| 99 oauth2=True, | 101 oauth2=True, |
| 100 ) | 102 ) |
| 103 yield api.test('trychange_oauth2_json') + api.properties( |
| 104 mastername='tryserver.chromium.linux', |
| 105 buildername='linux_rel', |
| 106 slavename='totallyaslave-c4', |
| 107 oauth2_json='/creds/something', |
| 108 ) |
| 101 yield api.test('tryjob_fail') + api.properties( | 109 yield api.test('tryjob_fail') + api.properties( |
| 102 mastername='tryserver.chromium.linux', | 110 mastername='tryserver.chromium.linux', |
| 103 buildername='linux_rel', | 111 buildername='linux_rel', |
| 104 slavename='totallyaslave-c4', | 112 slavename='totallyaslave-c4', |
| 105 issue=12345, | 113 issue=12345, |
| 106 patchset=654321, | 114 patchset=654321, |
| 107 patch_url='http://src.chromium.org/foo/bar', | 115 patch_url='http://src.chromium.org/foo/bar', |
| 108 ) + api.step_data('bot_update', retcode=1) | 116 ) + api.step_data('bot_update', retcode=1) |
| 109 yield api.test('tryjob_fail_patch') + api.properties( | 117 yield api.test('tryjob_fail_patch') + api.properties( |
| 110 mastername='tryserver.chromium.linux', | 118 mastername='tryserver.chromium.linux', |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 patch_url='http://src.chromium.org/foo/bar', | 188 patch_url='http://src.chromium.org/foo/bar', |
| 181 patch_project='v8', | 189 patch_project='v8', |
| 182 revisions={'src/v8': 'abc'} | 190 revisions={'src/v8': 'abc'} |
| 183 ) | 191 ) |
| 184 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( | 192 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( |
| 185 patch_project='v8', | 193 patch_project='v8', |
| 186 ) | 194 ) |
| 187 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( | 195 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( |
| 188 full_project_name='angle/angle', | 196 full_project_name='angle/angle', |
| 189 ) | 197 ) |
| OLD | NEW |