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 | 5 |
6 """Recipe module to ensure a checkout is consistant on a bot.""" | 6 """Recipe module to ensure a checkout is consistant on a bot.""" |
7 | 7 |
8 | 8 |
9 from slave import recipe_api | 9 from slave import recipe_api |
10 from slave import recipe_util | 10 from slave import recipe_util |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 | 112 |
113 # 2. What do we want to check out (spec/root/rev/rev_map). | 113 # 2. What do we want to check out (spec/root/rev/rev_map). |
114 ['--spec', spec_string], | 114 ['--spec', spec_string], |
115 ['--root', root], | 115 ['--root', root], |
116 ['--revision_mapping_file', self.m.json.input(rev_map)], | 116 ['--revision_mapping_file', self.m.json.input(rev_map)], |
117 | 117 |
118 # 3. How to find the patch, if any (issue/patchset/patch_url). | 118 # 3. How to find the patch, if any (issue/patchset/patch_url). |
119 ['--issue', issue], | 119 ['--issue', issue], |
120 ['--patchset', patchset], | 120 ['--patchset', patchset], |
121 ['--patch_url', patch_url], | 121 ['--patch_url', patch_url], |
| 122 ['--rietveld_server', self.m.properties.get('rietveld')], |
122 | 123 |
123 # 4. Hookups to JSON output back into recipes. | 124 # 4. Hookups to JSON output back into recipes. |
124 ['--output_json', self.m.json.output()],] | 125 ['--output_json', self.m.json.output()],] |
125 | 126 |
126 | 127 |
127 revisions = {} | 128 revisions = {} |
128 for solution in cfg.solutions: | 129 for solution in cfg.solutions: |
129 if solution.revision: | 130 if solution.revision: |
130 revisions[solution.name] = solution.revision | 131 revisions[solution.name] = solution.revision |
131 elif solution == cfg.solutions[0]: | 132 elif solution == cfg.solutions[0]: |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 'Patch failure', 'Check the bot_update step for details') | 204 'Patch failure', 'Check the bot_update step for details') |
204 | 205 |
205 # bot_update actually just sets root to be the folder name of the | 206 # bot_update actually just sets root to be the folder name of the |
206 # first solution. | 207 # first solution. |
207 if step_result.json.output['did_run']: | 208 if step_result.json.output['did_run']: |
208 co_root = step_result.json.output['root'] | 209 co_root = step_result.json.output['root'] |
209 cwd = kwargs.get('cwd', self.m.path['slave_build']) | 210 cwd = kwargs.get('cwd', self.m.path['slave_build']) |
210 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep)) | 211 self.m.path['checkout'] = cwd.join(*co_root.split(self.m.path.sep)) |
211 | 212 |
212 return step_result | 213 return step_result |
OLD | NEW |