Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/reframe-hpc/reframe into …
Browse files Browse the repository at this point in the history
…bugfix/log_httpjson_errors_2
  • Loading branch information
ekouts committed Jan 15, 2025
2 parents 2b8adff + 3ee98eb commit bba5e05
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
20 changes: 16 additions & 4 deletions reframe/core/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2310,8 +2310,9 @@ def check_performance(self):
return

# Check the performance variables against their references.
errors = []
for key, values in self._perfvalues.items():
val, ref, low_thres, high_thres, *_ = values
val, ref, low_thres, high_thres, unit = values

# Verify that val is a number
if not isinstance(val, numbers.Number):
Expand All @@ -2325,11 +2326,22 @@ def check_performance(self):
sn.evaluate(
sn.assert_reference(
val, ref, low_thres, high_thres,
msg=('failed to meet reference: %s={0}, '
'expected {1} (l={2}, u={3})' % tag))
msg=(f'{tag}={{0}} {unit}, expected {{1}} '
'(l={2}, u={3})'))
)
except SanityError as e:
raise PerformanceError(e) from None
errors.append(e.message)

# Combine all error messages to a single `PerformanceError` containing
# the information of all failed performance variables
if errors:
msg = 'failed to meet references:'
if len(errors) > 1:
msg += '\n\t'
else:
msg += ' '

raise PerformanceError(msg + '\n\t'.join(errors))

def _copy_job_files(self, job, dst):
if job is None:
Expand Down
3 changes: 2 additions & 1 deletion reframe/frontend/printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,8 @@ def _print_failure_info(rec, runid, total_runs):

self.info(f" * Reason: {msg}")
tb = ''.join(traceback.format_exception(
*rec['fail_info'].values()))
*rec['fail_info'].values())
)
if rec['fail_severe']:
self.info(tb)
else:
Expand Down

0 comments on commit bba5e05

Please sign in to comment.