From 50a4d73f299e052b4fc6063f55122cd564d19883 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 27 Oct 2026 08:11:08 +0100 Subject: [PATCH] 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 --- tests/vectors/document-variants-c2a/old-reader-refusal.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/vectors/document-variants-c2a/old-reader-refusal.sh b/tests/vectors/document-variants-c2a/old-reader-refusal.sh index 9bfede28..9b67a220 100755 --- a/tests/vectors/document-variants-c2a/old-reader-refusal.sh +++ b/tests/vectors/document-variants-c2a/old-reader-refusal.sh @@ -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 "]*className=\"[^\"]*$2\"" "$1" | wc -l; else echo 0; fi; }