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

Side by Side Diff: recipe_modules/infra_paths/path_config.py

Issue 1926033002: depot_tools: add infra_paths recipe module for infra-specific paths (attempt #2) (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: fixes Created 4 years, 7 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 unified diff | Download patch
OLDNEW
(Empty)
1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 import DEPS
6 CONFIG_CTX = DEPS['path'].CONFIG_CTX
7
8
9 @CONFIG_CTX()
10 def infra_common(c):
11 c.dynamic_paths['checkout'] = None
12
13
14 @CONFIG_CTX(includes=['infra_common'])
15 def infra_buildbot(c):
16 c.base_paths['root'] = c.CURRENT_WORKING_DIR[:-4]
17 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
18 c.base_paths['cache'] = c.base_paths['root'] + (
19 'build', 'slave', 'cache')
20 c.base_paths['git_cache'] = c.base_paths['root'] + (
21 'build', 'slave', 'cache_dir')
22 c.base_paths['goma_cache'] = c.base_paths['root'] + (
23 'build', 'slave', 'goma_cache')
24 for token in ('build_internal', 'build', 'depot_tools'):
25 c.base_paths[token] = c.base_paths['root'] + (token,)
26
27
28 @CONFIG_CTX(includes=['infra_common'])
29 def infra_kitchen(c):
30 c.base_paths['root'] = c.CURRENT_WORKING_DIR
31 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
32 # TODO(phajdan.jr): have one cache dir, let clients append suffixes.
33 # TODO(phajdan.jr): set persistent cache path for remaining platforms.
34 # NOTE: do not use /b/swarm_slave here - it gets deleted on bot redeploy,
35 # and may happen even after a reboot.
36 if c.PLATFORM == 'linux':
37 c.base_paths['cache'] = (
38 '/', 'b', 'cache', 'chromium')
39 c.base_paths['git_cache'] = (
40 '/', 'b', 'cache', 'chromium', 'git_cache')
41 c.base_paths['goma_cache'] = (
42 '/', 'b', 'cache', 'chromium', 'goma_cache')
43 else:
44 c.base_paths['cache'] = c.base_paths['root'] + ('cache',)
45 c.base_paths['git_cache'] = c.base_paths['root'] + ('cache_dir',)
46 c.base_paths['goma_cache'] = c.base_paths['root'] + ('goma_cache',)
OLDNEW
« no previous file with comments | « recipe_modules/infra_paths/example.expected/paths_kitchen_win.json ('k') | recipe_modules/infra_paths/test_api.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698