mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
presubmit: add depot_tools to PATH
BUG=584197 Review URL: https://codereview.chromium.org/1665233002 git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@298599 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
DEPS = [
|
||||
'recipe_engine/path',
|
||||
'recipe_engine/python',
|
||||
]
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -6,6 +6,9 @@
|
||||
"RECIPE_PACKAGE[depot_tools]/presubmit_support.py"
|
||||
],
|
||||
"cwd": "[SLAVE_BUILD]",
|
||||
"env": {
|
||||
"PATH": "%(PATH)s:RECIPE_PACKAGE[depot_tools]"
|
||||
},
|
||||
"name": "presubmit"
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user