diff options
author | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-07 07:42:22 +0000 |
---|---|---|
committer | hp <hp@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-06-07 07:42:22 +0000 |
commit | 8ae4469124849894971123a24cadbd318126a408 (patch) | |
tree | d748b7319e4eede14dc8b5c4a919bc710da7aad9 /contrib | |
parent | 41b60827878f5f840120c95c52846ce0fe072c3f (diff) | |
download | ppe42-gcc-8ae4469124849894971123a24cadbd318126a408.tar.gz ppe42-gcc-8ae4469124849894971123a24cadbd318126a408.zip |
* btest-gcc.sh: Add support for option
--add-passes-despite-regression.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@100699 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/regression/ChangeLog | 5 | ||||
-rwxr-xr-x | contrib/regression/btest-gcc.sh | 50 |
2 files changed, 47 insertions, 8 deletions
diff --git a/contrib/regression/ChangeLog b/contrib/regression/ChangeLog index c77a758ad1a..ae577173200 100644 --- a/contrib/regression/ChangeLog +++ b/contrib/regression/ChangeLog @@ -1,3 +1,8 @@ +2005-06-07 Hans-Peter Nilsson <hp@bitrange.com> + + * btest-gcc.sh: Add support for option + --add-passes-despite-regression. + 2005-06-06 Hans-Peter Nilsson <hp@axis.com> * btest-gcc.sh <Build>: Don't pass --with-newlib when target is diff --git a/contrib/regression/btest-gcc.sh b/contrib/regression/btest-gcc.sh index 7a704e69d29..2e9ea1e52d7 100755 --- a/contrib/regression/btest-gcc.sh +++ b/contrib/regression/btest-gcc.sh @@ -18,7 +18,20 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # INPUT: -# btest <target> <source> <prefix> <state> <build> +# btest <options> <target> <source> <prefix> <state> <build> + +add_passes_despite_regression=0 + +# <options> can be +# --add-passes-despite-regression: +# Add new "PASSes" despite there being some regressions. + +case "$1" in + --add-passes-despite-regression) + add_passes_despite_regression=1; shift;; + --*) echo "Invalid option: $1"; exit 2;; +esac + # TARGET is the target triplet. It should be the same one as used in # constructing PREFIX. Or it can be the keyword 'native', indicating # a target of whatever platform the script is running on. @@ -178,17 +191,38 @@ for LOG in $TESTLOGS ; do done | sort | uniq > $FAILED || exit 1 comm -12 $FAILED $PASSES >> $REGRESS || exit 1 NUMREGRESS=`wc -l < $REGRESS | tr -d ' '` + +if [ $NUMREGRESS -eq 0 ] || [ $add_passes_despite_regression -ne 0 ] ; then + # Update the state. + for LOG in $TESTLOGS ; do + L=`basename $LOG` + awk '/^PASS: / { print "'$L'",$2; }' $LOG || exit 1 + done | sort | uniq | comm -23 - $FAILED > ${PASSES}~ || exit 1 + [ -s ${PASSES}~ ] || exit 1 + if [ $NUMREGRESS -ne 0 ] ; then + # The way we keep track of new PASSes when in "regress-N" for + # --add-passes-despite-regression, is to *add* them to previous + # PASSes. Just as without this option, we don't forget *any* PASS + # lines, because besides the ones in $REGRESS that we definitely + # don't want to lose, their removal or rename may have been a + # mistake (as in, the cause of the "regress-N" state). If they + # come back, we then know they're regressions. + cat ${PASSES}~ ${PASSES} | sort -u > ${PASSES}~~ + mv ${PASSES}~~ ${PASSES} || exit 1 + rm ${PASSES}~ || exit 1 + else + # In contrast to the merging for "regress-N", we just overwrite + # the known PASSes when in the "pass" state, so we get rid of + # stale PASS lines for removed, moved or otherwise changed tests + # which may be added back with a different meaning later on. + mv ${PASSES}~ ${PASSES} || exit 1 + fi +fi + if [ $NUMREGRESS -ne 0 ] ; then echo regress-$NUMREGRESS > $RESULT exit 1 fi -# It passed. Update the state. -for LOG in $TESTLOGS ; do - L=`basename $LOG` - awk '/^PASS: / { print "'$L'",$2; }' $LOG || exit 1 -done | sort | uniq | comm -23 - $FAILED > ${PASSES}~ || exit 1 -[ -s ${PASSES}~ ] || exit 1 -mv ${PASSES}~ ${PASSES} || exit 1 echo pass > $RESULT exit 0 |