Index: infra/bots/recipes/swarm_presubmit.py |
diff --git a/infra/bots/recipes/swarm_presubmit.py b/infra/bots/recipes/swarm_presubmit.py |
index 84d82231e83e5bd2c7ee498e17b0ea489a0e55ab..fbbbd44c3e3991b13783d9cddda0f0e9cf821bd2 100644 |
--- a/infra/bots/recipes/swarm_presubmit.py |
+++ b/infra/bots/recipes/swarm_presubmit.py |
@@ -7,6 +7,7 @@ |
DEPS = [ |
+ 'build/file', |
'core', |
'depot_tools/depot_tools', |
'recipe_engine/path', |
@@ -21,13 +22,21 @@ def RunSteps(api): |
api.vars.setup() |
api.core.checkout_steps() |
+ # Create a local GOPATH. |
+ gopath = api.vars.slave_dir.join('gopath') |
+ if not api.path.exists(gopath): |
+ api.file.makedirs('gopath', gopath) |
+ |
api.step('git status', |
cmd=['git', 'status'], |
cwd=api.vars.skia_dir) |
depot_tools_path = api.depot_tools.package_repo_resource() |
script = depot_tools_path.join('presubmit_support.py') |
- env = {'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s'])} |
+ env = { |
+ 'PATH': api.path.pathsep.join([str(depot_tools_path), '%(PATH)s']), |
+ 'GOPATH': str(gopath), |
+ } |
# TODO(borenet): --upstream=HEAD^ is a hack to force presubmit_support to |
# find a diff. Otherwise, it quits early with: |
# "Warning, no PRESUBMIT.py found." |