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

Unified Diff: recipe_modules/path/api.py

Issue 1592973003: Allow base path overrides when running a recipe. (Closed) Base URL: git@github.com:luci/recipes-py.git@isolate
Patch Set: Created 4 years, 11 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: recipe_modules/path/api.py
diff --git a/recipe_modules/path/api.py b/recipe_modules/path/api.py
index c771a803bdc46f7aa4e904861c9dab76f4b6781a..8a46f6d1aac5c269b97767109e907875ec4239f0 100644
--- a/recipe_modules/path/api.py
+++ b/recipe_modules/path/api.py
@@ -125,7 +125,7 @@ def _split_path(path): # pragma: no cover
abs_path[0] = '/'
else:
assert False, 'Got unexpected path format: %r' % abs_path
- return abs_path
+ return tuple(abs_path)
class PathApi(recipe_api.RecipeApi):
@@ -150,6 +150,11 @@ class PathApi(recipe_api.RecipeApi):
return {
'CURRENT_WORKING_DIR': self._startup_cwd,
'TEMP_DIR': self._temp_dir,
+ 'BASE_PATH_OVERRIDES': {
+ k: _split_path(v)
+ for k, v in
+ self._engine.properties.get('base_path_overrides', {}).iteritems()
+ },
}
def __init__(self, **kwargs):

Powered by Google App Engine
This is Rietveld 408576698