public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-5805] contrib/regression/btest-gcc.sh: Optionally handle XPASS.
@ 2023-11-23 23:22 Hans-Peter Nilsson
0 siblings, 0 replies; only message in thread
From: Hans-Peter Nilsson @ 2023-11-23 23:22 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:4eafb9748b9f850558837ea8e08677a784c1d72b
commit r14-5805-g4eafb9748b9f850558837ea8e08677a784c1d72b
Author: Hans-Peter Nilsson <hp@axis.com>
Date: Wed Nov 22 18:52:34 2023 +0100
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.
Diff:
---
contrib/regression/btest-gcc.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/contrib/regression/btest-gcc.sh b/contrib/regression/btest-gcc.sh
index 3c031e93709..684019f715f 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 ' '`
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-11-23 23:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-23 23:22 [gcc r14-5805] contrib/regression/btest-gcc.sh: Optionally handle XPASS Hans-Peter Nilsson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).