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 12 matching lines...) Expand all Loading... |
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 no_shallow = True if api.properties.get('no_shallow') else False | 28 no_shallow = True if api.properties.get('no_shallow') else False |
29 output_manifest = api.properties.get('output_manifest', False) | 29 output_manifest = api.properties.get('output_manifest', False) |
30 with_branch_heads = api.properties.get('with_branch_heads', False) | 30 with_branch_heads = api.properties.get('with_branch_heads', False) |
31 refs = api.properties.get('refs', []) | 31 refs = api.properties.get('refs', []) |
32 oauth2 = api.properties.get('oauth2', False) | 32 oauth2 = api.properties.get('oauth2', False) |
| 33 oauth2_json = api.properties.get('oauth2_json', None) |
33 root_solution_revision = api.properties.get('root_solution_revision') | 34 root_solution_revision = api.properties.get('root_solution_revision') |
34 suffix = api.properties.get('suffix') | 35 suffix = api.properties.get('suffix') |
35 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 |
36 gerrit_no_rebase_patch_ref = bool( | 37 gerrit_no_rebase_patch_ref = bool( |
37 api.properties.get('gerrit_no_rebase_patch_ref')) | 38 api.properties.get('gerrit_no_rebase_patch_ref')) |
38 | 39 |
39 if api.properties.get('test_apply_gerrit_ref'): | 40 if api.properties.get('test_apply_gerrit_ref'): |
40 api.bot_update.apply_gerrit_ref( | 41 api.bot_update.apply_gerrit_ref( |
41 root='/tmp/test/root', | 42 root='/tmp/test/root', |
42 gerrit_no_reset=gerrit_no_reset, | 43 gerrit_no_reset=gerrit_no_reset, |
43 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) | 44 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) |
44 else: | 45 else: |
45 api.bot_update.ensure_checkout( | 46 api.bot_update.ensure_checkout( |
46 no_shallow=no_shallow, | 47 no_shallow=no_shallow, |
47 patch=patch, | 48 patch=patch, |
48 with_branch_heads=with_branch_heads, | 49 with_branch_heads=with_branch_heads, |
49 output_manifest=output_manifest, | 50 output_manifest=output_manifest, |
50 refs=refs, patch_oauth2=oauth2, | 51 refs=refs, patch_oauth2=oauth2, |
| 52 oauth2_json=oauth2_json, |
51 clobber=clobber, | 53 clobber=clobber, |
52 root_solution_revision=root_solution_revision, | 54 root_solution_revision=root_solution_revision, |
53 suffix=suffix, | 55 suffix=suffix, |
54 gerrit_no_reset=gerrit_no_reset, | 56 gerrit_no_reset=gerrit_no_reset, |
55 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) | 57 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) |
56 | 58 |
57 | 59 |
58 def GenTests(api): | 60 def GenTests(api): |
59 yield api.test('basic') + api.properties( | 61 yield api.test('basic') + api.properties( |
60 patch=False, | 62 patch=False, |
(...skipping 10 matching lines...) Expand all Loading... |
71 issue=12345, | 73 issue=12345, |
72 patchset=654321, | 74 patchset=654321, |
73 rietveld='https://rietveld.example.com/', | 75 rietveld='https://rietveld.example.com/', |
74 ) | 76 ) |
75 yield api.test('trychange') + api.properties( | 77 yield api.test('trychange') + api.properties( |
76 refs=['+refs/change/1/2/333'], | 78 refs=['+refs/change/1/2/333'], |
77 ) | 79 ) |
78 yield api.test('trychange_oauth2') + api.properties( | 80 yield api.test('trychange_oauth2') + api.properties( |
79 oauth2=True, | 81 oauth2=True, |
80 ) | 82 ) |
| 83 yield api.test('trychange_oauth2_json') + api.properties( |
| 84 mastername='tryserver.chromium.linux', |
| 85 buildername='linux_rel', |
| 86 slavename='totallyaslave-c4', |
| 87 oauth2_json='/creds/something', |
| 88 ) |
81 yield api.test('tryjob_fail') + api.properties( | 89 yield api.test('tryjob_fail') + api.properties( |
82 issue=12345, | 90 issue=12345, |
83 patchset=654321, | 91 patchset=654321, |
84 rietveld='https://rietveld.example.com/', | 92 rietveld='https://rietveld.example.com/', |
85 ) + api.step_data('bot_update', retcode=1) | 93 ) + api.step_data('bot_update', retcode=1) |
86 yield api.test('tryjob_fail_patch') + api.properties( | 94 yield api.test('tryjob_fail_patch') + api.properties( |
87 issue=12345, | 95 issue=12345, |
88 patchset=654321, | 96 patchset=654321, |
89 rietveld='https://rietveld.example.com/', | 97 rietveld='https://rietveld.example.com/', |
90 fail_patch='apply', | 98 fail_patch='apply', |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 rietveld='https://rietveld.example.com/', | 130 rietveld='https://rietveld.example.com/', |
123 patch_project='v8', | 131 patch_project='v8', |
124 revisions={'src/v8': 'abc'} | 132 revisions={'src/v8': 'abc'} |
125 ) | 133 ) |
126 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( | 134 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( |
127 patch_project='v8', | 135 patch_project='v8', |
128 ) | 136 ) |
129 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( | 137 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( |
130 full_project_name='angle/angle', | 138 full_project_name='angle/angle', |
131 ) | 139 ) |
OLD | NEW |