Skip to content

Commit 7b211de

Browse files
committed
use pre_run_shell_cmd_hook instead of ignore_test_failure
1 parent 5ad22cb commit 7b211de

1 file changed

Lines changed: 11 additions & 18 deletions

File tree

eb_hooks.py

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1575,19 +1575,6 @@ def pre_test_hook_ignore_failing_tests_OpenBabel_a64fx(self, *args, **kwargs):
15751575
self.cfg['testopts'] = "|| echo ignoring failing tests"
15761576

15771577

1578-
def pre_test_hook_ignore_failing_tests_LAMMPS_ARM_generic(self, *args, **kwargs):
1579-
"""
1580-
Pre-test hook for LAMMPS: skip failing ctest for selected LAMMPS version on ARM generic.
1581-
1582-
See: https://github.com/lammps/lammps/issues/4926
1583-
"""
1584-
if self.name == 'LAMMPS' and self.version in ('22Jul2025',):
1585-
cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')
1586-
if cpu_target == CPU_TARGET_AARCH64_GENERIC:
1587-
self.orig_ignore_test_failure = build_option('ignore_test_failure')
1588-
update_build_option('ignore_test_failure', True)
1589-
1590-
15911578
def pre_single_extension_hook(ext, *args, **kwargs):
15921579
"""Main pre-extension: trigger custom functions based on software name."""
15931580
if ext.name in PRE_SINGLE_EXTENSION_HOOKS:
@@ -1935,14 +1922,21 @@ def post_easyblock_hook(self, *args, **kwargs):
19351922
post_easyblock_hook_copy_easybuild_subdir(self, *args, **kwargs)
19361923
else:
19371924
self.log.debug("No CVMFS/site installation requested, not running post_easyblock_hook_copy_easybuild_subdir.")
1938-
1939-
# If self.orig_ignore_test_failure is set return it to its original value.
1940-
if hasattr(self, "orig_ignore_test_failure") and self.orig_ignore_test_failure != build_option('ignore_test_failure'):
1941-
update_build_option('ignore_test_failure', self.orig_ignore_test_failure)
19421925
else:
19431926
print_warning(f"Not enabling the post_easybuild_hook, as it requires EasyBuild 5.1.1 or newer (you are using {EASYBUILD_VERSION}).")
19441927

19451928

1929+
def pre_run_shell_cmd_hook(cmd, work_dir=None, **kwargs):
1930+
"""Main pre_shell_cmd_hook: trigger custom funtions based on software name."""
1931+
1932+
# Ignore failing ctest for LAMMPS/22Jul2025 on aarch64/generic
1933+
cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR')
1934+
if cpu_target == CPU_TARGET_AARCH64_GENERIC:
1935+
if bool(re.search('LAMMPS', work_dir)) and bool(re.search('22Jul2025', work_dir)):
1936+
if isinstance(cmd, str) and cmd.startswith('ctest') and '-LE unstable' in cmd:
1937+
cmd = cmd + ' || true'
1938+
1939+
19461940
PARSE_HOOKS = {
19471941
'casacore': parse_hook_casacore_disable_vectorize,
19481942
'CGAL': parse_hook_cgal_toolchainopts_precise,
@@ -2003,7 +1997,6 @@ def post_easyblock_hook(self, *args, **kwargs):
20031997
'netCDF': pre_test_hook_ignore_failing_tests_netCDF,
20041998
'OpenBabel': pre_test_hook_ignore_failing_tests_OpenBabel_a64fx,
20051999
'PyTorch': pre_test_hook_increase_max_failed_tests_arm_PyTorch,
2006-
'LAMMPS': pre_test_hook_ignore_failing_tests_LAMMPS_ARM_generic,
20072000
}
20082001

20092002
PRE_SINGLE_EXTENSION_HOOKS = {

0 commit comments

Comments
 (0)