Skip to content

Commit c98b701

Browse files
baibaichenclaude
andcommitted
[GLUTEN-10134][VL] Per-Suite Summary: use 4-label columns with Passed+Offload ratio
Replace Total/Pass/Fail/Offload/Fallback columns with the 4 classification labels (Passed+Offload, Failed+Offload, Passed+Fallback, Failed+Fallback). Remove Category column, sort by category. Show Passed+Offload percentage. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
1 parent 940497d commit c98b701

1 file changed

Lines changed: 21 additions & 18 deletions

File tree

.github/scripts/analyze-ansi.py

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -455,29 +455,32 @@ def format_summary(summary, json_tests, suites=None):
455455
# --- Per-Suite Summary (JSON only) ---
456456
if suites:
457457
lines.append("### Per-Suite Summary\n")
458-
lines.append("| Suite | Category | Total | Pass | Fail "
459-
"| Offload | Fallback |")
460-
lines.append("|---|---|---|---|---|---|---|")
458+
lines.append("| Suite | 🟢 Passed+Offload | 🟡 Failed+Offload "
459+
"| 🔴 Passed+Fallback | 🔴 Failed+Fallback |")
460+
lines.append("|---|---|---|---|---|")
461+
suite_rows = []
461462
for s in suites:
462463
name = s.get("suite", "").split(".")[-1]
463464
cat = s.get("category", "")
464465
tests = s.get("tests", [])
465-
total = len(tests)
466-
passed = failed = off = fb = 0
466+
counts = defaultdict(int)
467467
for t in tests:
468-
st = t.get("status")
469-
if st == "PASS":
470-
passed += 1
471-
elif st == "FAIL":
472-
failed += 1
473-
for r in t.get("records", []):
474-
ol = r.get("offload")
475-
if ol == "OFFLOAD":
476-
off += 1
477-
elif ol == "FALLBACK":
478-
fb += 1
479-
lines.append(f"| {name} | {cat} | {total} | {passed} "
480-
f"| {failed} | {off} | {fb} |")
468+
records = t.get("records", [])
469+
has_fallback = any(r.get("offload") == "FALLBACK"
470+
for r in records)
471+
has_offload_data = len(records) > 0
472+
_, label = classify_test(
473+
t.get("status", "PASSED"), has_fallback, has_offload_data)
474+
counts[label] += 1
475+
total = sum(counts.values())
476+
po = counts.get("Passed+Offload", 0)
477+
pct = f"{po * 100 / total:.0f}%" if total else "0%"
478+
suite_rows.append((cat, name, po, pct,
479+
counts.get("Failed+Offload", 0),
480+
counts.get("Passed+Fallback", 0),
481+
counts.get("Failed+Fallback", 0)))
482+
for cat, name, po, pct, fo, pfb, ffb in sorted(suite_rows):
483+
lines.append(f"| {name} | {po} ({pct}) | {fo} | {pfb} | {ffb} |")
481484
lines.append("")
482485

483486
# --- Failure Cause Analysis (JSON only) ---

0 commit comments

Comments
 (0)