OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 'depot_tools/bot_update', | 6 'depot_tools/bot_update', |
7 'depot_tools/gclient', | 7 'depot_tools/gclient', |
8 'depot_tools/git', | 8 'depot_tools/git', |
9 'depot_tools/presubmit', | 9 'depot_tools/presubmit', |
10 'recipe_engine/json', | 10 'recipe_engine/json', |
11 'recipe_engine/path', | 11 'recipe_engine/path', |
12 'recipe_engine/properties', | 12 'recipe_engine/properties', |
13 'recipe_engine/python', | 13 'recipe_engine/python', |
14 'depot_tools/tryserver', | 14 'depot_tools/tryserver', |
15 'depot_tools/rietveld', | 15 'depot_tools/rietveld', |
16 'v8', | 16 'v8', |
17 'webrtc', | 17 'webrtc', |
18 ] | 18 ] |
19 | 19 |
20 | 20 |
21 def _RunStepsInternal(api): | 21 def _RunStepsInternal(api): |
22 repo_name = api.properties['repo_name'] | 22 repo_name = api.properties['repo_name'] |
23 codereview_auth = api.properties.get('codereview_auth', False) | 23 codereview_auth = api.properties.get('codereview_auth', False) |
24 force_checkout = api.properties.get('force_checkout', False) | 24 force_checkout = api.properties.get('force_checkout', False) |
25 | 25 |
26 api.gclient.set_config(repo_name) | 26 api.gclient.set_config(repo_name) |
27 | 27 |
28 bot_update_step = api.bot_update.ensure_checkout( | 28 bot_update_step = api.bot_update.ensure_checkout( |
29 force=force_checkout, | 29 force=force_checkout, |
30 patch_oauth2=codereview_auth, | 30 patch_oauth2=codereview_auth) |
31 # TODO(tandrii): remove this to fix http://crbug.com/605541. | |
32 patch_root='TODO(TANDRII): REMOVE THIS TRANSITION TO patch_projects') | |
33 relative_root = api.gclient.calculate_patch_root( | 31 relative_root = api.gclient.calculate_patch_root( |
34 api.properties['patch_project']).rstrip('/') | 32 api.properties['patch_project']).rstrip('/') |
35 got_revision_property = api.gclient.c.got_revision_mapping[relative_root] | 33 got_revision_property = api.gclient.c.got_revision_mapping[relative_root] |
36 upstream = bot_update_step.json.output['properties'].get( | 34 upstream = bot_update_step.json.output['properties'].get( |
37 got_revision_property) | 35 got_revision_property) |
38 if (not upstream or | 36 if (not upstream or |
39 isinstance(upstream, int) or | 37 isinstance(upstream, int) or |
40 (upstream.isdigit() and len(upstream) < 40)): | 38 (upstream.isdigit() and len(upstream) < 40)): |
41 # If got_revision is an svn revision, then use got_revision_git. | 39 # If got_revision is an svn revision, then use got_revision_git. |
42 upstream = bot_update_step.json.output['properties'].get( | 40 upstream = bot_update_step.json.output['properties'].get( |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 api.test('recipes-py') + | 146 api.test('recipes-py') + |
149 api.properties.tryserver( | 147 api.properties.tryserver( |
150 mastername='tryserver.infra', | 148 mastername='tryserver.infra', |
151 buildername='infra_presubmit', | 149 buildername='infra_presubmit', |
152 repo_name='recipes_py', | 150 repo_name='recipes_py', |
153 patch_project='recipes-py', | 151 patch_project='recipes-py', |
154 runhooks=True) + | 152 runhooks=True) + |
155 api.step_data('presubmit', api.json.output([['infra_presubmit', | 153 api.step_data('presubmit', api.json.output([['infra_presubmit', |
156 ['compile']]])) | 154 ['compile']]])) |
157 ) | 155 ) |
OLD | NEW |