| OLD | NEW |
| 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_configs_util import config_item_context, ConfigGroup, BadConf |
| 8 from slave.recipe_configs_util import DictConfig, SimpleConfig, StaticConfig | 8 from slave.recipe_configs_util import DictConfig, SimpleConfig, StaticConfig |
| 9 from slave.recipe_configs_util import SetConfig, ConfigList, ListConfig | 9 from slave.recipe_configs_util import SetConfig, ConfigList, ListConfig |
| 10 | 10 |
| 11 def BaseConfig(USE_MIRROR=True, GIT_MODE=False): | 11 def BaseConfig(USE_MIRROR=True, GIT_MODE=False, **_kwargs): |
| 12 deps = '.DEPS.git' if GIT_MODE else 'DEPS' | 12 deps = '.DEPS.git' if GIT_MODE else 'DEPS' |
| 13 return ConfigGroup( | 13 return ConfigGroup( |
| 14 solutions = ConfigList( | 14 solutions = ConfigList( |
| 15 lambda: ConfigGroup( | 15 lambda: ConfigGroup( |
| 16 name = SimpleConfig(str), | 16 name = SimpleConfig(str), |
| 17 url = SimpleConfig(str), | 17 url = SimpleConfig(str), |
| 18 deps_file = SimpleConfig(str, empty_val=deps, required=False), | 18 deps_file = SimpleConfig(str, empty_val=deps, required=False), |
| 19 managed = SimpleConfig(bool, empty_val=True, required=False), | 19 managed = SimpleConfig(bool, empty_val=True, required=False), |
| 20 custom_deps = DictConfig(value_type=(str, types.NoneType)), | 20 custom_deps = DictConfig(value_type=(str, types.NoneType)), |
| 21 custom_vars = DictConfig(value_type=str), | 21 custom_vars = DictConfig(value_type=str), |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 118 |
| 119 @config_ctx() | 119 @config_ctx() |
| 120 def tools_build(c): | 120 def tools_build(c): |
| 121 if not c.GIT_MODE: | 121 if not c.GIT_MODE: |
| 122 raise BadConf('tools_build only supports git') | 122 raise BadConf('tools_build only supports git') |
| 123 s = c.solutions.add() | 123 s = c.solutions.add() |
| 124 s.name = 'build' | 124 s.name = 'build' |
| 125 s.url = ChromiumGitURL(c, 'chromium', 'tools', 'build.git') | 125 s.url = ChromiumGitURL(c, 'chromium', 'tools', 'build.git') |
| 126 | 126 |
| 127 | 127 |
| OLD | NEW |