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

Unified Diff: scripts/slave/recipe_modules/generator_script/api.py

Issue 23889036: Refactor the way that TestApi works so that it is actually useful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: License headers Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: scripts/slave/recipe_modules/generator_script/api.py
diff --git a/scripts/slave/recipe_modules/generator_script/api.py b/scripts/slave/recipe_modules/generator_script/api.py
index e5ed6c896c040beca36a1385b65f2066dc07cfc6..fd172dbcd2dc28d55230a62ecf394d03fc9912e7 100644
--- a/scripts/slave/recipe_modules/generator_script/api.py
+++ b/scripts/slave/recipe_modules/generator_script/api.py
@@ -7,16 +7,17 @@ from slave import recipe_api
class GeneratorScriptApi(recipe_api.RecipeApi):
def __call__(self, path_to_script, *args): # pragma: no cover
"""Run a script and generate the steps emitted by that script."""
+ f = '--output-json'
step_name = 'gen step(%s)' % self.m.path.basename(path_to_script)
if path_to_script.endswith('.py'):
yield self.m.python(
step_name,
- path_to_script, list(args) + [self.m.json.output()],
+ path_to_script, list(args) + [f, self.m.json.output()],
cwd=self.m.path.checkout())
else:
yield self.m.step(
step_name,
- [path_to_script,] + list(args) + [self.m.json.output()],
+ [path_to_script,] + list(args) + [f, self.m.json.output()],
cwd=self.m.path.checkout())
new_steps = self.m.step_history.last_step().json.output
assert isinstance(new_steps, list)
« no previous file with comments | « scripts/slave/recipe_modules/gclient/example.py ('k') | scripts/slave/recipe_modules/generator_script/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698