Skip to content

Commit

Permalink
tools: cron: improve pr comment test report
Browse files Browse the repository at this point in the history
Add failed/passed tests count to comment with test results
  • Loading branch information
piotrnarajowski authored and mkasenberg committed Sep 26, 2024
1 parent c4de233 commit 2943ec4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/cron/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,12 +137,12 @@ def report_to_review_msg(report_path):
failed.append(line.strip())

if len(failed) > 0:
msg += f'<details><summary>Failed tests</summary>{"<br>".join(failed)}</details>\n'
msg += f'<details><summary>Failed tests ({len(failed)})</summary>{"<br>".join(failed)}</details>\n'
else:
msg += 'No failed test found.\n'

if len(passed) > 0:
msg += f'<details><summary>Successful tests</summary>{"<br>".join(passed)}</details>\n'
msg += f'<details><summary>Successful tests ({len(passed)})</summary>{"<br>".join(passed)}</details>\n'

return msg

Expand Down

0 comments on commit 2943ec4

Please sign in to comment.