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

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: Copyright notices Created 5 years, 7 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 6 from recipe_engine import recipe_util
7 7
8 import textwrap 8 import textwrap
9 9
10 class PythonApi(recipe_api.RecipeApi): 10 class PythonApi(recipe_api.RecipeApi):
11 def __call__(self, name, script, args=None, unbuffered=True, **kwargs): 11 def __call__(self, name, script, args=None, unbuffered=True, **kwargs):
12 """Return a step to run a python script with arguments.""" 12 """Return a step to run a python script with arguments."""
13 cmd = ['python'] 13 cmd = ['python']
14 if unbuffered: 14 if unbuffered:
15 cmd.append('-u') 15 cmd.append('-u')
16 cmd.append(script) 16 cmd.append(script)
(...skipping 30 matching lines...) Expand all
47 else: 47 else:
48 self.m.step.active_result.presentation.step_text = text 48 self.m.step.active_result.presentation.step_text = text
49 49
50 def succeeding_step(self, name, text, as_log=None): 50 def succeeding_step(self, name, text, as_log=None):
51 """Return a succeeding step (correctly recognized in expectations).""" 51 """Return a succeeding step (correctly recognized in expectations)."""
52 return self.result_step(name, text, 0, as_log=as_log) 52 return self.result_step(name, text, 0, as_log=as_log)
53 53
54 def failing_step(self, name, text, as_log=None): 54 def failing_step(self, name, text, as_log=None):
55 """Return a failing step (correctly recognized in expectations).""" 55 """Return a failing step (correctly recognized in expectations)."""
56 return self.result_step(name, text, 1, as_log=as_log) 56 return self.result_step(name, text, 1, as_log=as_log)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698