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

Side by Side Diff: scripts/slave/recipe_modules/path/config.py

Issue 985273002: Changed recipe_modules base paths to be abstract entities in their own right. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Actual code change Created 5 years, 9 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 | Annotate | Revision Log
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 from slave.recipe_config import config_item_context, ConfigGroup, Dict, Static 5 from slave.recipe_config import config_item_context, ConfigGroup, Dict, Static
6 from slave.recipe_config_types import Path 6 from slave.recipe_config_types import Path, NamedBasePath
iannucci 2015/03/07 02:55:03 unused?
luqui 2015/03/09 18:49:28 Done.
7 7
8 def BaseConfig(CURRENT_WORKING_DIR, TEMP_DIR, **_kwargs): 8 def BaseConfig(CURRENT_WORKING_DIR, TEMP_DIR, **_kwargs):
9 assert CURRENT_WORKING_DIR[0].endswith(('\\', '/')) 9 assert CURRENT_WORKING_DIR[0].endswith(('\\', '/'))
10 assert TEMP_DIR[0].endswith(('\\', '/')) 10 assert TEMP_DIR[0].endswith(('\\', '/'))
11 return ConfigGroup( 11 return ConfigGroup(
12 # base path name -> [tokenized absolute path] 12 # base path name -> [tokenized absolute path]
13 base_paths = Dict(value_type=tuple), 13 base_paths = Dict(value_type=tuple),
14 14
15 # dynamic path name -> Path object (referencing one of the base_paths) 15 # dynamic path name -> Path object (referencing one of the base_paths)
16 dynamic_paths = Dict(value_type=(Path, type(None))), 16 dynamic_paths = Dict(value_type=(Path, type(None))),
(...skipping 27 matching lines...) Expand all
44 c.base_paths['tmp_base'] = c.TEMP_DIR 44 c.base_paths['tmp_base'] = c.TEMP_DIR
45 45
46 @config_ctx() 46 @config_ctx()
47 def buildbot(c): 47 def buildbot(c):
48 c.base_paths['root'] = c.CURRENT_WORKING_DIR[:-4] 48 c.base_paths['root'] = c.CURRENT_WORKING_DIR[:-4]
49 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR 49 c.base_paths['slave_build'] = c.CURRENT_WORKING_DIR
50 for token in ('build_internal', 'build', 'depot_tools'): 50 for token in ('build_internal', 'build', 'depot_tools'):
51 c.base_paths[token] = c.base_paths['root'] + (token,) 51 c.base_paths[token] = c.base_paths['root'] + (token,)
52 c.dynamic_paths['checkout'] = None 52 c.dynamic_paths['checkout'] = None
53 53
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698