diff --git a/eessi/testsuite/common_config.py b/eessi/testsuite/common_config.py index a7728021..c74f5bd9 100644 --- a/eessi/testsuite/common_config.py +++ b/eessi/testsuite/common_config.py @@ -172,11 +172,12 @@ def common_eessi_init(eessi_version=None): Deprecated - print warning with suggested change. """ getlogger().warning(' '.join([ - 'common_eessi_init() is deprecated, you should replace the prepare_cmds in your ReFrame configuration.' - ' On systems that have a module command available, you should no longer need any prepare_cmds.' - " On systems that don't have a module command available, you need something like" - " 'prepare_cmds' : ['source /cvfms/software.eessi.io/2025.06/init/lmod/bash && module unload EESSI']" - " in order to use the Lmod from the EESSI compatibility layer (but not yet have an EESSI version loaded)" + "common_eessi_init() is deprecated, you should update the 'prepare_cmds' in your ReFrame configuration.\n" + "On systems that have a `module` command available, you no longer need to add any EESSI-specific commands to " + "'prepare_cmds', unless jobs start in a clean environment (e.g. with sbatch --export=NONE), where you set:\n" + "'prepare_cmds': ['export MODULEPATH=/cvmfs/software.eessi.io/init/modules'].\n" + "If no `module` command is available, source Lmod from the compatibility layer using:\n" + "'prepare_cmds' : ['source /cvfms/software.eessi.io/2025.06/init/lmod/bash && module unload EESSI']" ])) return 'source /cvfms/software.eessi.io/2025.06/init/lmod/bash && module unload EESSI' diff --git a/eessi/testsuite/utils.py b/eessi/testsuite/utils.py index 95d92a2d..44b9fb57 100644 --- a/eessi/testsuite/utils.py +++ b/eessi/testsuite/utils.py @@ -182,6 +182,10 @@ def _is_valid_for_env(mod, env): snap0.restore() seen = set() dupes = [] + + if len(_modules_cache[part.fullname][env.name]) == 0: + getlogger().warning(f"No '{regex}' modules found in partition '{part.fullname}' environment '{env}'") + for mod in _modules_cache[part.fullname][env.name]: modmod = mod if name_only: