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

Unified Diff: scripts/slave/recipe_api.py

Issue 24737002: Add Paths as first-class types in configs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/slave/recipe_config_types.py » ('j') | scripts/slave/recipe_config_types.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/recipe_api.py
diff --git a/scripts/slave/recipe_api.py b/scripts/slave/recipe_api.py
index 06d2cfac0ae5afd13036426a5ff46546bac5a643..ee74029dfa1306f0a68be306c3db80b7ed9de4a2 100644
--- a/scripts/slave/recipe_api.py
+++ b/scripts/slave/recipe_api.py
@@ -44,7 +44,7 @@ class RecipeApi(object):
"""Returns a 'config blob' for the current API."""
return self.make_config_params(config_name, optional, **CONFIG_VARS)[0]
- def make_config_params(self, config_name=None, optional=False, **CONFIG_VARS):
+ def make_config_params(self, config_name, optional=False, **CONFIG_VARS):
agable 2013/09/26 21:46:02 Why did these lose their default value of config_n
iannucci 2013/09/27 02:08:20 Because it's mostly called from make_config and se
"""Returns a 'config blob' for the current API, and the computed params
for all dependent configurations.
@@ -85,17 +85,20 @@ class RecipeApi(object):
else:
raise # TODO(iannucci): raise a better exception.
- def set_config(self, config_name, optional=False, **CONFIG_VARS):
+ def set_config(self, config_name=None, optional=False, include_deps=True,
+ **CONFIG_VARS):
"""Sets the modules and its dependencies to the named configuration."""
assert self._module
config, params = self.make_config_params(config_name, optional,
**CONFIG_VARS)
if config:
self.c = config
- # TODO(iannucci): This is 'inefficient', since if a dep comes up multiple
- # times in this recursion, it will get set_config()'d multiple times
- for dep in self._module.DEPS:
- getattr(self.m, dep).set_config(config_name, optional=True, **params)
+
+ if include_deps:
+ # TODO(iannucci): This is 'inefficient', since if a dep comes up multiple
+ # times in this recursion, it will get set_config()'d multiple times
+ for dep in self._module.DEPS:
+ getattr(self.m, dep).set_config(config_name, optional=True, **params)
def apply_config(self, config_name, config_object=None):
"""Apply a named configuration to the provided config object or self."""
« no previous file with comments | « no previous file | scripts/slave/recipe_config_types.py » ('j') | scripts/slave/recipe_config_types.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698