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

Side by Side Diff: third_party/recipe_engine/config.py

Issue 1151423002: Move recipe engine to third_party/recipe_engine. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Moved field_composer_test with its buddies Created 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/recipe_engine/__init__.py ('k') | third_party/recipe_engine/config_types.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013-2015 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 """Recipe Configuration Meta DSL. 5 """Recipe Configuration Meta DSL.
6 6
7 This module contains, essentially, a DSL for writing composable configurations. 7 This module contains, essentially, a DSL for writing composable configurations.
8 You start by defining a schema which describes how your configuration blobs will 8 You start by defining a schema which describes how your configuration blobs will
9 be structured, and what data they can contain. For example: 9 be structured, and what data they can contain. For example:
10 10
11 FakeSchema = lambda main_val=True, mode='Happy': ConfigGroup( 11 FakeSchema = lambda main_val=True, mode='Happy': ConfigGroup(
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 def default_config_vars(): 263 def default_config_vars():
264 ret = {} 264 ret = {}
265 for include in includes or []: 265 for include in includes or []:
266 item = self.CONFIG_ITEMS[include] 266 item = self.CONFIG_ITEMS[include]
267 ret.update(item.DEFAULT_CONFIG_VARS()) 267 ret.update(item.DEFAULT_CONFIG_VARS())
268 if config_vars: 268 if config_vars:
269 ret.update(config_vars) 269 ret.update(config_vars)
270 return ret 270 return ret
271 inner.DEFAULT_CONFIG_VARS = default_config_vars 271 inner.DEFAULT_CONFIG_VARS = default_config_vars
272 272
273 assert name not in self.CONFIG_ITEMS 273 assert name not in self.CONFIG_ITEMS, (
274 '%s is already in CONFIG_ITEMS' % name)
274 self.CONFIG_ITEMS[name] = inner 275 self.CONFIG_ITEMS[name] = inner
275 if group: 276 if group:
276 self.MUTEX_GROUPS.setdefault(group, set()).add(name) 277 self.MUTEX_GROUPS.setdefault(group, set()).add(name)
277 inner.IS_ROOT = is_root 278 inner.IS_ROOT = is_root
278 if is_root: 279 if is_root:
279 assert not self.ROOT_CONFIG_ITEM, ( 280 assert not self.ROOT_CONFIG_ITEM, (
280 'may only have one root config_ctx!') 281 'may only have one root config_ctx!')
281 self.ROOT_CONFIG_ITEM = inner 282 self.ROOT_CONFIG_ITEM = inner
282 inner.IS_ROOT = True 283 inner.IS_ROOT = True
283 inner.NO_TEST = no_test or bool(deps) 284 inner.NO_TEST = no_test or bool(deps)
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 return self.data 784 return self.data
784 785
785 def reset(self): 786 def reset(self):
786 assert False 787 assert False
787 788
788 def complete(self): 789 def complete(self):
789 return True 790 return True
790 791
791 def _is_default(self): 792 def _is_default(self):
792 return True 793 return True
OLDNEW
« no previous file with comments | « third_party/recipe_engine/__init__.py ('k') | third_party/recipe_engine/config_types.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698