diff options
author | Guillaume Tucker <guillaume.tucker@collabora.com> | 2019-02-07 11:17:26 +0000 |
---|---|---|
committer | Guillaume Tucker <guillaume.tucker@collabora.com> | 2019-02-25 08:05:50 +0000 |
commit | c802cbbf424da594811637cf76204155dd1b140a (patch) | |
tree | 5f3c4103e34f61b240dd2494db5882929c646a32 /kernelci/configs.py | |
parent | 98308d127141b5c66425311c84e8deafde1f631a (diff) |
kernelci.configs: add defaults dictionary in YAML configuration
Replace the 'build_configs_default_arch_list' with a more generic
'build_configs_defaults' dictionary to hold all the defaults for the
build configs (still only the arch list for now).
Update build-configs.yaml accordingly.
Signed-off-by: Guillaume Tucker <guillaume.tucker@collabora.com>
Diffstat (limited to 'kernelci/configs.py')
-rw-r--r-- | kernelci/configs.py | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/kernelci/configs.py b/kernelci/configs.py index fecaec5..3f6bf40 100644 --- a/kernelci/configs.py +++ b/kernelci/configs.py @@ -206,11 +206,9 @@ class BuildConfig(YAMLObject): self._fragments = fragments or [] @classmethod - def from_yaml(cls, config, name, trees, fragments, arch_list): - kw = { - 'name': name, - 'arch_list': arch_list, - } + def from_yaml(cls, config, name, trees, fragments, defaults): + kw = dict(defaults) + kw['name'] = name kw.update(cls._kw_from_yaml( config, ['name', 'tree', 'branch', 'arch_list', 'fragments'])) kw['tree'] = trees[kw['tree']] @@ -601,10 +599,10 @@ def builds_from_yaml(yaml_path): for name, config in data['fragments'].iteritems() } - arch_list = data.get('build_configs_default_arch_list') + defaults = data.get('build_configs_defaults') build_configs = { - name: BuildConfig.from_yaml(config, name, trees, fragments, arch_list) + name: BuildConfig.from_yaml(config, name, trees, fragments, defaults) for name, config in data['build_configs'].iteritems() } |