aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/vars
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2017-03-21 08:20:33 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-21 12:51:40 +0000
commitbbb24f2ab83e4799ad392be3e49168425c6555b0 (patch)
tree7ebd09fd2e1e6d45bd10193b5e369df86ae8e576 /infra/bots/recipe_modules/vars
parent89150582643f1ef4893a0cdeaadf5886e5cde76d (diff)
Followup fixes for recipe roll
Simplifying some environment madness. Nobody gets to modify default_env. Always apply it in run.__call__(). Add depot_tools path to PATH in default_env. Result is simpler but now default_env is applied in many more places, which should be harmless. BUG=skia: Change-Id: I8299d50bde2bc3e2d47568a267d1d962a3fc3d56 Reviewed-on: https://skia-review.googlesource.com/9916 Reviewed-by: Ravi Mistry <rmistry@google.com> Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/vars')
-rw-r--r--infra/bots/recipe_modules/vars/__init__.py1
-rw-r--r--infra/bots/recipe_modules/vars/api.py6
2 files changed, 6 insertions, 1 deletions
diff --git a/infra/bots/recipe_modules/vars/__init__.py b/infra/bots/recipe_modules/vars/__init__.py
index b3a5340649..d5cf1da80b 100644
--- a/infra/bots/recipe_modules/vars/__init__.py
+++ b/infra/bots/recipe_modules/vars/__init__.py
@@ -4,6 +4,7 @@
DEPS = [
'builder_name_schema',
+ 'depot_tools/bot_update',
'recipe_engine/json',
'recipe_engine/path',
'recipe_engine/properties',
diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py
index 2e2923b986..93910fecda 100644
--- a/infra/bots/recipe_modules/vars/api.py
+++ b/infra/bots/recipe_modules/vars/api.py
@@ -31,7 +31,11 @@ class SkiaVarsApi(recipe_api.RecipeApi):
self.slave_dir = self.m.path['start_dir']
self.checkout_root = self.slave_dir
- self.default_env = {}
+ self.default_env = self.m.step.get_from_context('env', {})
+ self.default_env['PATH'] = self.m.path.pathsep.join([
+ self.default_env.get('PATH', '%(PATH)s'),
+ str(self.m.bot_update._module.PACKAGE_REPO_ROOT),
+ ])
self.gclient_env = {}
self.is_compile_bot = self.builder_name.startswith('Build-')
self.no_buildbot = self.m.properties.get('nobuildbot', '') == 'True'