Skip to content

Commit

Permalink
improve result summary (addendum to PR #668) (#695)
Browse files Browse the repository at this point in the history
I forgot to push this 🤦

Signed-off-by: Matthias Büchse <[email protected]>
  • Loading branch information
mbuechse authored Aug 14, 2024
1 parent bdc979f commit e011683
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions Tests/scs-compliance-check.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,14 @@ def print_report(subject: str, suite: TestSuite, targets: dict, results: dict, v
print(f"{subject} {suite.name}:")
for tname, target_spec in targets.items():
by_result = suite.select(tname, target_spec).evaluate(results)
missing, failed = by_result[0], by_result[-1]
passed, missing, failed = by_result[1], by_result[0], by_result[-1]
verdict = 'FAIL' if failed else 'TENTATIVE pass' if missing else 'PASS'
if failed or missing:
verdict += f" ({len(failed)} failed, {len(missing)} missing)"
summary_parts = [f"{len(passed)} passed"]
if failed:
summary_parts.append(f"{len(failed)} failed")
if missing:
summary_parts.append(f"{len(missing)} missing")
verdict += f" ({', '.join(summary_parts)})"
print(f"- {tname}: {verdict}")
for offenders, category in ((failed, 'FAILED'), (missing, 'MISSING')):
if category == 'MISSING' and suite.partial:
Expand Down

0 comments on commit e011683

Please sign in to comment.