| 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 from slave import recipe_api | 5 from recipe_engine import recipe_api |
| 6 | 6 |
| 7 class BuildbotApi(recipe_api.RecipeApi): | 7 class BuildbotApi(recipe_api.RecipeApi): |
| 8 def prep(self): | 8 def prep(self): |
| 9 """Prepatory steps for buildbot based recipes.""" | 9 """Prepatory steps for buildbot based recipes.""" |
| 10 # TODO(iannucci): Also do taskkill? | 10 # TODO(iannucci): Also do taskkill? |
| 11 self.m.python( | 11 self.m.python( |
| 12 'cleanup temp', | 12 'cleanup temp', |
| 13 self.m.path['build'].join('scripts', 'slave', 'cleanup_temp.py') | 13 self.m.path['build'].join('scripts', 'slave', 'cleanup_temp.py') |
| 14 ) | 14 ) |
| 15 | 15 |
| 16 def copy_parent_got_revision_to_got_revision(self): | 16 def copy_parent_got_revision_to_got_revision(self): |
| 17 """Returns a step which copies the 'parent_got_revision' build property | 17 """Returns a step which copies the 'parent_got_revision' build property |
| 18 to the 'got_revision' build property. This is needed for recipes which | 18 to the 'got_revision' build property. This is needed for recipes which |
| 19 use isolates for testing and which skip the src/ checkout.""" | 19 use isolates for testing and which skip the src/ checkout.""" |
| 20 | 20 |
| 21 result = self.m.python.inline( | 21 result = self.m.python.inline( |
| 22 'copy parent_got_revision to got_revision', | 22 'copy parent_got_revision to got_revision', |
| 23 'exit()') | 23 'exit()') |
| 24 result.presentation.properties['got_revision'] = ( | 24 result.presentation.properties['got_revision'] = ( |
| 25 self.m.properties['parent_got_revision']) | 25 self.m.properties['parent_got_revision']) |
| OLD | NEW |