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

Unified Diff: recipe_engine/recipe_api.py

Issue 1421843006: Add simple depends_on API. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/recipes-py@master
Patch Set: Created 5 years, 1 month 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: recipe_engine/recipe_api.py
diff --git a/recipe_engine/recipe_api.py b/recipe_engine/recipe_api.py
index 985abe200e90516e993c956a9840d6c695a39d8a..504b233ab7c1f1e6521caf265093035a1663dd31 100644
--- a/recipe_engine/recipe_api.py
+++ b/recipe_engine/recipe_api.py
@@ -4,8 +4,12 @@
from __future__ import absolute_import
import contextlib
+import json
import keyword
+import os
import re
+import subprocess
+import tempfile
import types
from functools import wraps
@@ -454,7 +458,9 @@ class RecipeApi(RecipeApiPlain):
class RecipeScriptApi(RecipeApiPlain, ModuleInjectionSite):
- pass
+ def depend_on(self, recipe, properties):
+ recipe_script = self._engine._universe.load_recipe(recipe)
+ return recipe_script.run(self, properties)
# This is a sentinel object for the Property system. This allows users to
« no previous file with comments | « recipe_engine/loader.py ('k') | recipe_engine/recipe_test_api.py » ('j') | recipes/top.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698