containerize: fix concretization -> concretizer (#31594)
* containerize: fix concretization -> concretizer * fix test
This commit is contained in:
parent
a552c27f74
commit
e2056377d0
3 changed files with 8 additions and 8 deletions
|
@ -59,7 +59,7 @@ other techniques to minimize the size of the final image:
|
||||||
&& echo " specs:" \
|
&& echo " specs:" \
|
||||||
&& echo " - gromacs+mpi" \
|
&& echo " - gromacs+mpi" \
|
||||||
&& echo " - mpich" \
|
&& echo " - mpich" \
|
||||||
&& echo " concretizer: together" \
|
&& echo " concretizer:" \
|
||||||
&& echo " unify: true" \
|
&& echo " unify: true" \
|
||||||
&& echo " config:" \
|
&& echo " config:" \
|
||||||
&& echo " install_tree: /opt/software" \
|
&& echo " install_tree: /opt/software" \
|
||||||
|
|
|
@ -55,13 +55,13 @@ def validate(configuration_file):
|
||||||
warnings.warn(msg.format(subsection, configuration_file))
|
warnings.warn(msg.format(subsection, configuration_file))
|
||||||
env_dict.pop(subsection)
|
env_dict.pop(subsection)
|
||||||
|
|
||||||
# Set the default value of the concretization strategy to "together" and
|
# Set the default value of the concretization strategy to unify and
|
||||||
# warn if the user explicitly set another value
|
# warn if the user explicitly set another value
|
||||||
env_dict.setdefault('concretization', 'together')
|
env_dict.setdefault('concretizer', {'unify': True})
|
||||||
if env_dict['concretization'] != 'together':
|
if not env_dict['concretizer']['unify'] is True:
|
||||||
msg = ('the "concretization" attribute of the environment is set '
|
warnings.warn('"concretizer:unify" is not set to "true", which means the '
|
||||||
'to "{0}" [the advised value is instead "together"]')
|
'generated image may contain different variants of the same '
|
||||||
warnings.warn(msg.format(env_dict['concretization']))
|
'packages. Set to "true" to get a consistent set of packages.')
|
||||||
|
|
||||||
# Check if the install tree was explicitly set to a custom value and warn
|
# Check if the install tree was explicitly set to a custom value and warn
|
||||||
# that it will be overridden
|
# that it will be overridden
|
||||||
|
|
|
@ -31,7 +31,7 @@ def test_package_info(image):
|
||||||
|
|
||||||
@pytest.mark.parametrize('extra_config,expected_msg', [
|
@pytest.mark.parametrize('extra_config,expected_msg', [
|
||||||
({'modules': {'enable': ['tcl']}}, 'the subsection "modules" in'),
|
({'modules': {'enable': ['tcl']}}, 'the subsection "modules" in'),
|
||||||
({'concretization': 'separately'}, 'the "concretization" attribute'),
|
({'concretizer': {'unify': False}}, '"concretizer:unify" is not set to "true"'),
|
||||||
({'config': {'install_tree': '/some/dir'}},
|
({'config': {'install_tree': '/some/dir'}},
|
||||||
'the "config:install_tree" attribute has been set'),
|
'the "config:install_tree" attribute has been set'),
|
||||||
({'view': '/some/dir'}, 'the "view" attribute has been set')
|
({'view': '/some/dir'}, 'the "view" attribute has been set')
|
||||||
|
|
Loading…
Reference in a new issue