Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions eessi/testsuite/common_config.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,51 @@
import json
import os

from reframe.core.config import load_config
from reframe.core.exceptions import ConfigError
from reframe.core.logging import getlogger

from eessi.testsuite.constants import FEATURES
from eessi.testsuite.utils import EESSIError


def reframe_version_is_supported():
testconfig = load_config()
testconfig.update_config({
'systems': [{
'name': 'config_probe',
'hostnames': ['.*'],
'partitions': [{
'name': 'default',
'scheduler': 'local',
'launcher': 'local',
'environs': ['EESSI-2025.06'],
# feature names starting with a digit must be supported
'features': ['16_nodes'],
}],
}],
'environments': [{
# environment names containing dots must be supported
'name': 'EESSI-2025.06',
}],
}, '<config-probe>')

try:
testconfig.validate()
except ConfigError:
return False

return True


if not reframe_version_is_supported():
msg = ' '.join([
'The EESSI test suite does not support this ReFrame version due to feature name and environment name',
'restrictions. Unsupported versions: >=4.10.1,<4.11',
'See https://github.com/reframe-hpc/reframe/issues/3723 for details.',
])
raise EESSIError(msg)


perflog_format = '|'.join([
'%(check_job_completion_time)s',
Expand Down
6 changes: 5 additions & 1 deletion eessi/testsuite/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@
pass


def make_red(msg):
return f'\033[31m{msg}\033[0m'


class EESSIError(ReframeFatalError):
traceback = os.getenv('TRACEBACK', "0")
addendum = ''
Expand All @@ -46,7 +50,7 @@ class EESSIError(ReframeFatalError):
addendum = '\nRerun with `TRACEBACK=1 reframe ...` to show the full traceback.'

def __str__(self):
return super().__str__() + EESSIError.addendum
return make_red(super().__str__()) + EESSIError.addendum


def log(msg, logger=printer.debug):
Expand Down
Loading