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

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

Issue 1917263002: Revert of depot_tools: add infra_paths recipe module for infra-specific paths (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « recipe_modules/infra_paths/api.py ('k') | recipe_modules/infra_paths/example.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 from recipe_engine.config import config_item_context, ConfigGroup, Dict, Static
6 from recipe_engine.config_types import Path
7
8 def BaseConfig(PLATFORM, CURRENT_WORKING_DIR, ROOT, **_kwargs):
9 return ConfigGroup(
10 paths = Dict(value_type=Path),
11
12 PLATFORM = Static(PLATFORM),
13 CURRENT_WORKING_DIR = Static(CURRENT_WORKING_DIR),
14 ROOT = Static(ROOT),
15 )
16
17 config_ctx = config_item_context(BaseConfig)
18
19 @config_ctx()
20 def buildbot(c):
21 c.paths['root'] = c.ROOT.join('b')
22 c.paths['slave_build'] = c.CURRENT_WORKING_DIR
23 c.paths['cache'] = c.paths['root'].join(
24 'build', 'slave', 'cache')
25 c.paths['git_cache'] = c.paths['root'].join(
26 'build', 'slave', 'cache_dir')
27 c.paths['goma_cache'] = c.paths['root'].join(
28 'build', 'slave', 'goma_cache')
29 for token in ('build_internal', 'build', 'depot_tools'):
30 c.paths[token] = c.paths['root'].join(token,)
31
32 @config_ctx()
33 def kitchen(c):
34 c.paths['root'] = c.CURRENT_WORKING_DIR
35 c.paths['slave_build'] = c.CURRENT_WORKING_DIR
36 # TODO(phajdan.jr): have one cache dir, let clients append suffixes.
37 # TODO(phajdan.jr): set persistent cache path for remaining platforms.
38 # NOTE: do not use /b/swarm_slave here - it gets deleted on bot redeploy,
39 # and may happen even after a reboot.
40 if c.PLATFORM == 'linux':
41 c.paths['cache'] = c.ROOT.join(
42 'b', 'cache', 'chromium')
43 c.paths['git_cache'] = c.ROOT.join(
44 'b', 'cache', 'chromium', 'git_cache')
45 c.paths['goma_cache'] = c.ROOT.join(
46 'b', 'cache', 'chromium', 'goma_cache')
47 else:
48 c.paths['cache'] = c.paths['root'].join('cache')
49 c.paths['git_cache'] = c.paths['root'].join('cache_dir')
50 c.paths['goma_cache'] = c.paths['root'].join('goma_cache')
OLDNEW
« no previous file with comments | « recipe_modules/infra_paths/api.py ('k') | recipe_modules/infra_paths/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698