diff --git a/eb_hooks.py b/eb_hooks.py index bfe34762..df3467e9 100644 --- a/eb_hooks.py +++ b/eb_hooks.py @@ -2127,6 +2127,21 @@ def pre_single_extension_numpy(ext, *args, **kwargs): update_build_option('optarch', 'march=armv8.2-a') +def pre_single_extension_orjson(ext, *args, **kwargs): + """ + Disable test prone to failing due to solar/legal timezone behavior in Etc/UTC on eessi container on Deucalion. + """ + if ext.name == 'orjson': + # Disable UTC zoneinfo UTC test, as the behavior can be dependent on how + # `localinfo`s are configured on the system + cpu_target = get_eessi_envvar('EESSI_SOFTWARE_SUBDIR') + # Make this specific to a64fx, since the problem was observed only there + if cpu_target == CPU_TARGET_A64FX: + runtest = ext.cfg.get('runtest', '') + if 'pytest' in runtest: + ext.cfg['runtest'] = runtest + ' -k "not test_datetime_zoneinfo_utc"' + + def pre_single_extension_hf_xet(ext, *args, **kwargs): """ Pre-single-extension hook for hf_xet (extension of huggingface-hub) on aarch64/generic: @@ -2681,6 +2696,7 @@ def post_easyblock_hook(self, *args, **kwargs): PRE_SINGLE_EXTENSION_HOOKS = { 'isoband': pre_single_extension_isoband, 'numpy': pre_single_extension_numpy, + 'orjson': pre_single_extension_orjson, 'testthat': pre_single_extension_testthat, 'hf_xet': pre_single_extension_hf_xet, 'hf-xet': pre_single_extension_hf_xet,