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

Unified Diff: recipe_modules/presubmit/api.py

Issue 1665233002: presubmit: add depot_tools to PATH (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « recipe_modules/presubmit/__init__.py ('k') | recipe_modules/presubmit/example.expected/basic.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/presubmit/api.py
diff --git a/recipe_modules/presubmit/api.py b/recipe_modules/presubmit/api.py
index 3fbf3169091346aeb45df1064ff2a6327c099fca..99fe4d72784adc5253ffd741261d0d42fedf9ba1 100644
--- a/recipe_modules/presubmit/api.py
+++ b/recipe_modules/presubmit/api.py
@@ -7,7 +7,14 @@ from recipe_engine import recipe_api
class PresubmitApi(recipe_api.RecipeApi):
def __call__(self, *args, **kwargs):
"""Return a presubmit step."""
+
name = kwargs.pop('name', 'presubmit')
+
+ kwargs.setdefault('env', {})
+ kwargs['env'].setdefault('PATH', '%(PATH)s')
+ kwargs['env']['PATH'] = self.m.path.pathsep.join([
+ kwargs['env']['PATH'], str(self._module.PACKAGE_DIRECTORY)])
+
return self.m.python(
name, self.package_resource('presubmit_support.py'), list(args),
**kwargs)
« no previous file with comments | « recipe_modules/presubmit/__init__.py ('k') | recipe_modules/presubmit/example.expected/basic.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698