Commit 3b1e6424 authored by John Budorick's avatar John Budorick Committed by Commit Bot

presubmit: use depot_tools.on_path rather than a handrolled equivalent.

Noticed this while attempting to debug issues with the
src-internal-presubmit builder. Not sure if this is the cause but
would like to at least rule it out.

Bug: 925774
Recipe-Nontrivial-Roll: build
Recipe-Nontrivial-Roll: build_limited_scripts_slave
Recipe-Nontrivial-Roll: release_scripts
Change-Id: I323f49e23d2c8af11b374e22ebfbcf5bcd836ba3
Reviewed-on: https://chromium-review.googlesource.com/c/1464049
Commit-Queue: John Budorick <jbudorick@chromium.org>
Reviewed-by: 's avatarRobbie Iannucci <iannucci@chromium.org>
parent ae2acf7b
......@@ -723,7 +723,7 @@ Raises:
StepFailure or InfraFailure.
### *recipe_modules* / [presubmit](/recipes/recipe_modules/presubmit)
[DEPS](/recipes/recipe_modules/presubmit/__init__.py#1): [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step]
[DEPS](/recipes/recipe_modules/presubmit/__init__.py#1): [depot\_tools](#recipe_modules-depot_tools), [recipe\_engine/context][recipe_engine/recipe_modules/context], [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python], [recipe\_engine/step][recipe_engine/recipe_modules/step]
#### **class [PresubmitApi](/recipes/recipe_modules/presubmit/api.py#7)([RecipeApi][recipe_engine/wkt/RecipeApi]):**
......
DEPS = [
'depot_tools',
'recipe_engine/context',
'recipe_engine/path',
'recipe_engine/python',
......
......@@ -14,11 +14,6 @@ class PresubmitApi(recipe_api.RecipeApi):
name = kwargs.pop('name', 'presubmit')
env = self.m.context.env
env.setdefault('PATH', '%(PATH)s')
env['PATH'] = self.m.path.pathsep.join([
env['PATH'], str(self._module.PACKAGE_REPO_ROOT)])
with self.m.context(env=env):
with self.m.depot_tools.on_path():
return self.m.python(
name, self.presubmit_support_path, list(args), **kwargs)
......@@ -5,8 +5,10 @@
"-u",
"RECIPE_PACKAGE_REPO[depot_tools]/presubmit_support.py"
],
"env": {
"PATH": "<PATH>:RECIPE_PACKAGE_REPO[depot_tools]"
"env_prefixes": {
"PATH": [
"RECIPE_PACKAGE_REPO[depot_tools]"
]
},
"name": "presubmit"
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment