From 4eafb9748b9f850558837ea8e08677a784c1d72b Mon Sep 17 00:00:00 2001 From: Hans-Peter Nilsson Date: Wed, 22 Nov 2023 18:52:34 +0100 Subject: contrib/regression/btest-gcc.sh: Optionally handle XPASS. Tests with keys that match both PASS, FAIL (or now optionally XPASS), count as fail. XPASSes were previously ignored. Handling them as FAIL seems the most useful alternative, but not counting XPASSes may be deliberate. It's also a matter of compatibility, so make it optional. Attempts to use --handle-xpass-as-fail was previously flagged as a usage error. If you pass it now, on state with previous mixed XPASS and PASS results but doesn't change in this run, the XPASS is discovered as a (new) regression. For new XPASSing tests, it's handled as a new FAIL. * btest-gcc.sh (--handle-xpass-as-fail): New option. --- contrib/regression/btest-gcc.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'contrib/regression') diff --git a/contrib/regression/btest-gcc.sh b/contrib/regression/btest-gcc.sh index 3c031e9..684019f 100755 --- a/contrib/regression/btest-gcc.sh +++ b/contrib/regression/btest-gcc.sh @@ -22,17 +22,22 @@ add_passes_despite_regression=0 dashj='' +handle_xpass_as_fail=false # can be # --add-passes-despite-regression: # Add new "PASSes" despite there being some regressions. # -j: # Pass '-j' to make. +# --handle-xpass-as-fail: +# Count XPASS as a FAIL (default ignored). while : ; do case "$1" in --add-passes-despite-regression) add_passes_despite_regression=1;; + --handle-xpass-as-fail) + handle_xpass_as_fail=true;; -j*) dashj=$1;; -*) echo "Invalid option: $1"; exit 2;; @@ -203,7 +208,11 @@ done # Work out what failed for LOG in $TESTLOGS ; do L=`basename $LOG` - awk '/^FAIL: / { print "'$L'",$2; }' $LOG || exit 1 + if $handle_xpass_as_fail ; then + awk '/^(FAIL|XPASS): / { print "'$L'",$2; }' $LOG || exit 1 + else + awk '/^FAIL: / { print "'$L'",$2; }' $LOG || exit 1 + fi done | sort | uniq > $FAILED || exit 1 comm -12 $FAILED $PASSES >> $REGRESS || exit 1 NUMREGRESS=`wc -l < $REGRESS | tr -d ' '` -- cgit v1.1