Tests: a gate stage that prints no REFLIST-SUMMARY line fails by name instead of aborting

summary_of ended in a grep that exits 1 on no match; under set -e that killed the script before it named the failed stage. With the
head ref-list test red (owns-declares-only) the gate exited 1 naming nothing; it now names head-ref-list and summary-diff.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-27 08:11:08 +01:00
commit 50a4d73f29

View file

@ -113,7 +113,8 @@ probe_staged() {
return $rc
}
summary_of() { grep -o 'REFLIST-SUMMARY .*' "$1" | sort -u; }
# A log with no summary line (a stage that failed before printing one) yields an empty file, and the gate names the failure.
summary_of() { { grep -o 'REFLIST-SUMMARY .*' "$1" || true; } | sort -u; }
# Cases a TRX records for test classes whose name ends in $2 (every class when $2 is empty); 0 when the run wrote no TRX.
trx_cases() { if [ -f "$1" ]; then grep -o "<TestMethod [^>]*className=\"[^\"]*$2\"" "$1" | wc -l; else echo 0; fi; }