Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(712)

Side by Side Diff: scripts/slave/recipe_modules/python/api.py

Issue 1151423002: Move recipe engine to third_party/recipe_engine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Moved field_composer_test with its buddies Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 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 from slave import recipe_api 5 from recipe_engine import recipe_api
6 from slave import recipe_util
7 6
8 import textwrap 7 import textwrap
9 8
10 class PythonApi(recipe_api.RecipeApi): 9 class PythonApi(recipe_api.RecipeApi):
11 def __call__(self, name, script, args=None, unbuffered=True, **kwargs): 10 def __call__(self, name, script, args=None, unbuffered=True, **kwargs):
12 """Return a step to run a python script with arguments.""" 11 """Return a step to run a python script with arguments."""
13 cmd = ['python'] 12 cmd = ['python']
14 if unbuffered: 13 if unbuffered:
15 cmd.append('-u') 14 cmd.append('-u')
16 cmd.append(script) 15 cmd.append(script)
(...skipping 30 matching lines...) Expand all
47 else: 46 else:
48 self.m.step.active_result.presentation.step_text = text 47 self.m.step.active_result.presentation.step_text = text
49 48
50 def succeeding_step(self, name, text, as_log=None): 49 def succeeding_step(self, name, text, as_log=None):
51 """Return a succeeding step (correctly recognized in expectations).""" 50 """Return a succeeding step (correctly recognized in expectations)."""
52 return self.result_step(name, text, 0, as_log=as_log) 51 return self.result_step(name, text, 0, as_log=as_log)
53 52
54 def failing_step(self, name, text, as_log=None): 53 def failing_step(self, name, text, as_log=None):
55 """Return a failing step (correctly recognized in expectations).""" 54 """Return a failing step (correctly recognized in expectations)."""
56 return self.result_step(name, text, 1, as_log=as_log) 55 return self.result_step(name, text, 1, as_log=as_log)
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/properties/test_api.py ('k') | scripts/slave/recipe_modules/raw_io/api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698