Skip to content

Commit

Permalink
tests: repeat the failure reason in the detailed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-schwartz committed Sep 1, 2023
1 parent 0833a0f commit 156a9ba
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions run_project_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,9 @@ def tqdm_print(*args: mlog.TV_Loggable, sep: str = ' ') -> None:
right_w = max(3, right_w)
failing_testcases.append(name_str)
failing_logs.append(f'\n\x1b[31m{"="*left_w}\x1b[0m {name_str} \x1b[31m{"="*right_w}\x1b[0m\n')
_during = bold('Failed during:')
_reason = bold('Reason:')
failing_logs.append(f'{_during} {result.step.name}\n{_reason} {result.msg}\n')
if result.step == BuildStep.configure and result.mlog != no_meson_log_msg:
# For configure failures, instead of printing stdout,
# print the meson log if available since it's a superset
Expand Down

0 comments on commit 156a9ba

Please sign in to comment.