diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2023-11-22 18:52:34 +0100 |
---|---|---|
committer | Hans-Peter Nilsson <hp@bitrange.com> | 2023-11-24 00:21:31 +0100 |
commit | 4eafb9748b9f850558837ea8e08677a784c1d72b (patch) | |
tree | af3d393a5d7bb45263849e0878b8b7c751c8d5a7 /contrib/regression | |
parent | 071dadb728d0ed712af26f81fbe470b266a55607 (diff) | |
download | gcc-4eafb9748b9f850558837ea8e08677a784c1d72b.zip gcc-4eafb9748b9f850558837ea8e08677a784c1d72b.tar.gz gcc-4eafb9748b9f850558837ea8e08677a784c1d72b.tar.bz2 |
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.
Diffstat (limited to 'contrib/regression')
-rwxr-xr-x | contrib/regression/btest-gcc.sh | 11 |
1 files changed, 10 insertions, 1 deletions
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 # <options> can be # --add-passes-despite-regression: # Add new "PASSes" despite there being some regressions. # -j<n>: # Pass '-j<n>' 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 ' '` |