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/platform', | |
9 'recipe_engine/path', | 8 'recipe_engine/path', |
10 'recipe_engine/properties', | 9 'recipe_engine/properties', |
11 ] | 10 ] |
12 | 11 |
13 def RunSteps(api): | 12 def RunSteps(api): |
14 api.gclient.use_mirror = True | 13 api.gclient.use_mirror = True |
15 | 14 |
16 src_cfg = api.gclient.make_config(CACHE_DIR='[GIT_CACHE]') | 15 src_cfg = api.gclient.make_config(CACHE_DIR='[GIT_CACHE]') |
17 soln = src_cfg.solutions.add() | 16 soln = src_cfg.solutions.add() |
18 soln.name = 'src' | 17 soln.name = 'src' |
19 soln.url = 'https://chromium.googlesource.com/chromium/src.git' | 18 soln.url = 'https://chromium.googlesource.com/chromium/src.git' |
20 soln.revision = api.properties.get('revision') | 19 soln.revision = api.properties.get('revision') |
21 api.gclient.c = src_cfg | 20 api.gclient.c = src_cfg |
22 api.gclient.c.revisions.update(api.properties.get('revisions', {})) | 21 api.gclient.c.revisions.update(api.properties.get('revisions', {})) |
23 api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision' | 22 api.gclient.c.got_revision_mapping['src'] = 'got_cr_revision' |
24 api.gclient.c.patch_projects['v8'] = ('src/v8', 'HEAD') | 23 api.gclient.c.patch_projects['v8'] = ('src/v8', 'HEAD') |
25 api.gclient.c.patch_projects['angle/angle'] = ('src/third_party/angle', | 24 api.gclient.c.patch_projects['angle/angle'] = ('src/third_party/angle', |
26 'HEAD') | 25 'HEAD') |
27 patch = api.properties.get('patch', True) | 26 patch = api.properties.get('patch', True) |
28 clobber = True if api.properties.get('clobber') else False | 27 clobber = True if api.properties.get('clobber') 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 oauth2_json = api.properties.get('oauth2_json', False) | |
35 root_solution_revision = api.properties.get('root_solution_revision') | 33 root_solution_revision = api.properties.get('root_solution_revision') |
36 suffix = api.properties.get('suffix') | 34 suffix = api.properties.get('suffix') |
37 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 |
38 gerrit_no_rebase_patch_ref = bool( | 36 gerrit_no_rebase_patch_ref = bool( |
39 api.properties.get('gerrit_no_rebase_patch_ref')) | 37 api.properties.get('gerrit_no_rebase_patch_ref')) |
40 | 38 |
41 if api.properties.get('test_apply_gerrit_ref'): | 39 if api.properties.get('test_apply_gerrit_ref'): |
42 api.bot_update.apply_gerrit_ref( | 40 api.bot_update.apply_gerrit_ref( |
43 root='/tmp/test/root', | 41 root='/tmp/test/root', |
44 gerrit_no_reset=gerrit_no_reset, | 42 gerrit_no_reset=gerrit_no_reset, |
45 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) | 43 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) |
46 else: | 44 else: |
47 api.bot_update.ensure_checkout( | 45 api.bot_update.ensure_checkout( |
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 oauth2_json=oauth2_json, | |
54 clobber=clobber, | 51 clobber=clobber, |
55 root_solution_revision=root_solution_revision, | 52 root_solution_revision=root_solution_revision, |
56 suffix=suffix, | 53 suffix=suffix, |
57 gerrit_no_reset=gerrit_no_reset, | 54 gerrit_no_reset=gerrit_no_reset, |
58 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) | 55 gerrit_no_rebase_patch_ref=gerrit_no_rebase_patch_ref) |
59 | 56 |
60 | 57 |
61 def GenTests(api): | 58 def GenTests(api): |
62 yield api.test('basic') + api.properties( | 59 yield api.test('basic') + api.properties( |
63 patch=False, | 60 patch=False, |
(...skipping 10 matching lines...) Expand all Loading... |
74 issue=12345, | 71 issue=12345, |
75 patchset=654321, | 72 patchset=654321, |
76 rietveld='https://rietveld.example.com/', | 73 rietveld='https://rietveld.example.com/', |
77 ) | 74 ) |
78 yield api.test('trychange') + api.properties( | 75 yield api.test('trychange') + api.properties( |
79 refs=['+refs/change/1/2/333'], | 76 refs=['+refs/change/1/2/333'], |
80 ) | 77 ) |
81 yield api.test('trychange_oauth2') + api.properties( | 78 yield api.test('trychange_oauth2') + api.properties( |
82 oauth2=True, | 79 oauth2=True, |
83 ) | 80 ) |
84 yield api.test('trychange_oauth2_json') + api.properties( | |
85 mastername='tryserver.chromium.linux', | |
86 buildername='linux_rel', | |
87 slavename='totallyaslave-c4', | |
88 oauth2_json=True, | |
89 ) | |
90 yield api.test('trychange_oauth2_json_win') + api.properties( | |
91 mastername='tryserver.chromium.win', | |
92 buildername='win_rel', | |
93 slavename='totallyaslave-c4', | |
94 oauth2_json=True, | |
95 ) + api.platform('win', 64) | |
96 yield api.test('tryjob_fail') + api.properties( | 81 yield api.test('tryjob_fail') + api.properties( |
97 issue=12345, | 82 issue=12345, |
98 patchset=654321, | 83 patchset=654321, |
99 rietveld='https://rietveld.example.com/', | 84 rietveld='https://rietveld.example.com/', |
100 ) + api.step_data('bot_update', retcode=1) | 85 ) + api.step_data('bot_update', retcode=1) |
101 yield api.test('tryjob_fail_patch') + api.properties( | 86 yield api.test('tryjob_fail_patch') + api.properties( |
102 issue=12345, | 87 issue=12345, |
103 patchset=654321, | 88 patchset=654321, |
104 rietveld='https://rietveld.example.com/', | 89 rietveld='https://rietveld.example.com/', |
105 fail_patch='apply', | 90 fail_patch='apply', |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 rietveld='https://rietveld.example.com/', | 122 rietveld='https://rietveld.example.com/', |
138 patch_project='v8', | 123 patch_project='v8', |
139 revisions={'src/v8': 'abc'} | 124 revisions={'src/v8': 'abc'} |
140 ) | 125 ) |
141 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( | 126 yield api.test('tryjob_v8_head_by_default') + api.properties.tryserver( |
142 patch_project='v8', | 127 patch_project='v8', |
143 ) | 128 ) |
144 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( | 129 yield api.test('tryjob_gerrit_angle') + api.properties.tryserver_gerrit( |
145 full_project_name='angle/angle', | 130 full_project_name='angle/angle', |
146 ) | 131 ) |
OLD | NEW |