|
40 | 40 | import easybuild.tools.environment as env |
41 | 41 | from easybuild.framework.easyblock import EasyBlock |
42 | 42 | from easybuild.framework.easyconfig import CUSTOM |
| 43 | +from easybuild.framework.easyconfig.default import DEFAULT_CONFIG |
43 | 44 | from easybuild.framework.easyconfig.easyconfig import get_easyblock_class |
44 | 45 | from easybuild.tools.build_log import EasyBuildError, print_msg |
45 | 46 | from easybuild.tools.modules import get_software_root, get_software_version |
@@ -121,8 +122,21 @@ def __init__(self, *args, **kwargs): |
121 | 122 | comp_cfg['name'] = comp_name |
122 | 123 | comp_cfg['version'] = comp_version |
123 | 124 |
|
| 125 | + # The copy above may include unexpected settings for common values. |
| 126 | + # In particular for a Pythonbundle we have seen a component inheriting |
| 127 | + # runtest = True |
| 128 | + # which is not a valid value for many easyblocks. |
| 129 | + # Reset runtest to the original default, if people want the test step |
| 130 | + # they can set it explicitly, in default_component_specs or by the component easyblock |
| 131 | + if comp_cfg._config['runtest'] != DEFAULT_CONFIG["runtest"]: |
| 132 | + self.log.warning( |
| 133 | + "Resetting runtest to default value for component easyblock " |
| 134 | + f"(from {comp_cfg._config['runtest']})." |
| 135 | + ) |
| 136 | + comp_cfg._config['runtest'] = DEFAULT_CONFIG["runtest"] |
| 137 | + |
124 | 138 | # determine easyblock to use for this component |
125 | | - # - if an easyblock is specified explicitely, that will be used |
| 139 | + # - if an easyblock is specified explicitly, that will be used |
126 | 140 | # - if not, a software-specific easyblock will be considered by get_easyblock_class |
127 | 141 | # - if no easyblock was found, default_easyblock is considered |
128 | 142 | comp_easyblock = comp_specs.get('easyblock') |
@@ -300,7 +314,7 @@ def install_step(self): |
300 | 314 | self.comp_cfgs_sanity_check.append(comp) |
301 | 315 |
|
302 | 316 | # run relevant steps |
303 | | - for step_name in ['patch', 'configure', 'build', 'install']: |
| 317 | + for step_name in ['patch', 'configure', 'build', 'test', 'install']: |
304 | 318 | if step_name in cfg['skipsteps']: |
305 | 319 | comp.log.info("Skipping '%s' step for component %s v%s", step_name, cfg['name'], cfg['version']) |
306 | 320 | else: |
|
0 commit comments