aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/vars/api.py
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2018-04-26 14:23:08 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-26 18:51:13 +0000
commite8615f969e92009551b70c85d1913202390e0b0d (patch)
treecdabbd4f78be6bbed4dfe6774d13b7e8f93abcc7 /infra/bots/recipe_modules/vars/api.py
parent329694260c6d40ea3ef8fff45d67bbc5a35b1276 (diff)
[recipes] Use named caches for git and workdirs
Bug: skia: Change-Id: Iaf3d190252c9483c8b9e58a3ab0305db4173cc1c Reviewed-on: https://skia-review.googlesource.com/123929 Commit-Queue: Eric Boren <borenet@google.com> Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/vars/api.py')
-rw-r--r--infra/bots/recipe_modules/vars/api.py15
1 files changed, 3 insertions, 12 deletions
diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py
index 26bde8c9d8..28589377cd 100644
--- a/infra/bots/recipe_modules/vars/api.py
+++ b/infra/bots/recipe_modules/vars/api.py
@@ -15,12 +15,6 @@ CONFIG_RELEASE = 'Release'
class SkiaVarsApi(recipe_api.RecipeApi):
- def make_path(self, *path):
- """Return a Path object for the given path."""
- key = 'custom_%s' % '_'.join(path)
- self.m.path.c.base_paths[key] = tuple(path)
- return self.m.path[key]
-
def setup(self):
"""Prepare the variables."""
# Setup
@@ -59,13 +53,10 @@ class SkiaVarsApi(recipe_api.RecipeApi):
if 'Coverage' in self.builder_name and 'Upload' in self.builder_name:
self.persistent_checkout = True
+ self.cache_dir = self.slave_dir.join('cache')
if self.persistent_checkout:
- if 'Win' in self.builder_name:
- self.checkout_root = self.make_path('C:\\', 'b', 'work')
- self.gclient_cache = self.make_path('C:\\', 'b', 'cache')
- else:
- self.checkout_root = self.make_path('/', 'b', 'work')
- self.gclient_cache = self.make_path('/', 'b', 'cache')
+ self.checkout_root = self.cache_dir.join('work')
+ self.gclient_cache = self.cache_dir.join('git')
# got_revision is filled in after checkout steps.
self.got_revision = None