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

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

Issue 23889036: Refactor the way that TestApi works so that it is actually useful. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: License headers Created 7 years, 3 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 import types 5 import types
6 6
7 from slave.recipe_configs_util import config_item_context, ConfigGroup, BadConf 7 from slave.recipe_config import config_item_context, ConfigGroup, BadConf
8 from slave.recipe_configs_util import Dict, Single, Static, Set, ConfigList 8 from slave.recipe_config import ConfigList, Dict, Single, Static, Set, List
9 from slave.recipe_configs_util import List
10 9
11 def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None, **_kwargs): 10 def BaseConfig(USE_MIRROR=True, GIT_MODE=False, CACHE_DIR=None, **_kwargs):
12 deps = '.DEPS.git' if GIT_MODE else 'DEPS' 11 deps = '.DEPS.git' if GIT_MODE else 'DEPS'
13 cache_dir = str(CACHE_DIR) if GIT_MODE and CACHE_DIR else None 12 cache_dir = str(CACHE_DIR) if GIT_MODE and CACHE_DIR else None
14 return ConfigGroup( 13 return ConfigGroup(
15 solutions = ConfigList( 14 solutions = ConfigList(
16 lambda: ConfigGroup( 15 lambda: ConfigGroup(
17 name = Single(basestring), 16 name = Single(basestring),
18 url = Single(basestring), 17 url = Single(basestring),
19 deps_file = Single(basestring, empty_val=deps, required=False, 18 deps_file = Single(basestring, empty_val=deps, required=False,
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 189
191 @config_ctx(config_vars={'GIT_MODE': True}) 190 @config_ctx(config_vars={'GIT_MODE': True})
192 def tools_build(c): 191 def tools_build(c):
193 if not c.GIT_MODE: 192 if not c.GIT_MODE:
194 raise BadConf('tools_build only supports git') 193 raise BadConf('tools_build only supports git')
195 s = c.solutions.add() 194 s = c.solutions.add()
196 s.name = 'build' 195 s.name = 'build'
197 s.url = ChromiumGitURL(c, 'chromium', 'tools', 'build.git') 196 s.url = ChromiumGitURL(c, 'chromium', 'tools', 'build.git')
198 197
199 198
OLDNEW
« no previous file with comments | « scripts/slave/recipe_modules/gclient/api.py ('k') | scripts/slave/recipe_modules/gclient/example.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698