Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(524)

Unified Diff: recipe_modules/infra_paths/path_config.py

Issue 2102503002: infra_paths: enable persistent cache also on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: update Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: recipe_modules/infra_paths/path_config.py
diff --git a/recipe_modules/infra_paths/path_config.py b/recipe_modules/infra_paths/path_config.py
index 6b7bb33c15f2db3cdc88370de839b0e8d53be6dd..8c1d0a603f28d5166cf3ccf7923a5e7bdad3f97d 100644
--- a/recipe_modules/infra_paths/path_config.py
+++ b/recipe_modules/infra_paths/path_config.py
@@ -30,15 +30,21 @@ def infra_kitchen(c):
c.base_paths['root'] = c.CURRENT_WORKING_DIR
c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
# TODO(phajdan.jr): have one cache dir, let clients append suffixes.
- # TODO(phajdan.jr): set persistent cache path for remaining platforms.
- # NOTE: do not use /b/swarm_slave here - it gets deleted on bot redeploy,
- # and may happen even after a reboot.
+
+ b_dir = c.CURRENT_WORKING_DIR
+ while b_dir and b_dir[-1] != 'b':
+ b_dir = b_dir[:-1]
+
if c.PLATFORM in ('linux', 'mac'):
c.base_paths['cache'] = (
'/', 'b', 'cache', 'chromium')
for path in ('builder_cache', 'git_cache', 'goma_cache', 'goma_deps_cache'):
c.base_paths[path] = c.base_paths['cache'] + (path,)
- else:
+ elif b_dir:
+ c.base_paths['cache'] = b_dir + ('cache', 'chromium')
Sergiy Byelozyorov 2016/06/27 10:58:35 Is it valid to add lists and tuples? Maybe better
Paweł Hajdan Jr. 2016/06/27 10:59:07 It's already a tuple.
Sergiy Byelozyorov 2016/06/27 11:26:48 Indeed, thanks for pointing this out. I thought us
+ for path in ('builder_cache', 'git_cache', 'goma_cache', 'goma_deps_cache'):
+ c.base_paths[path] = c.base_paths['cache'] + (path,)
+ else: # pragma: no cover
c.base_paths['cache'] = c.base_paths['root'] + ('cache',)
c.base_paths['git_cache'] = c.base_paths['root'] + ('cache_dir',)
for path in ('builder_cache', 'goma_cache', 'goma_deps_cache'):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698