aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorMike Stump <mrs@wrs.com>1998-07-27 21:12:03 +0000
committerJeff Law <law@gcc.gnu.org>1998-07-27 15:12:03 -0600
commit31e9c6ed12df44df91228ab9bd5d7c723b59c73a (patch)
tree9fd59314372b16681d988b3afcc0b106107aaef8 /contrib
parent91fa313b84e475985bebea5d795381fbab300fd7 (diff)
downloadgcc-31e9c6ed12df44df91228ab9bd5d7c723b59c73a.zip
gcc-31e9c6ed12df44df91228ab9bd5d7c723b59c73a.tar.gz
gcc-31e9c6ed12df44df91228ab9bd5d7c723b59c73a.tar.bz2
* compare_tests: New script.
From-SVN: r21422
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog4
-rwxr-xr-xcontrib/compare_tests98
2 files changed, 102 insertions, 0 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 26707ea..bcea4db 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jul 27 22:08:12 1998 Mike Stump (mrs@wrs.com)
+
+ * compare_tests: New script.
+
1998-07-28 Alexandre Oliva <oliva@dcc.unicamp.br>
* test_summary: assigned copyright to FSF
diff --git a/contrib/compare_tests b/contrib/compare_tests
new file mode 100755
index 0000000..7a1d76c
--- /dev/null
+++ b/contrib/compare_tests
@@ -0,0 +1,98 @@
+#!/bin/sh
+# This script automatically test the given tool with the tool's test cases,
+# reporting anything of interest.
+
+# exits with 1 if there is nothing of interest
+# exits with 0 if there is something interesting
+# exits with 2 if an error occurred
+
+# Give two .sum files to compare them
+
+# Written by Mike Stump <mrs@cygnus.com>
+
+tmp1=/tmp/$tool-testing.$$a
+tmp2=/tmp/$tool-testing.$$b
+now_s=/tmp/$tool-testing.$$d
+before_s=/tmp/$tool-testing.$$e
+
+if [ "$2" = "" ]; then
+ echo "Usage: $0 previous current" >&2
+ exit 2
+fi
+
+sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$1" >$tmp1
+sed 's/^XFAIL/FAIL/; s/^XPASS/PASS/' < "$2" >$tmp2
+
+before=$tmp1
+now=$tmp2
+
+trap "rm -f $tmp1 $tmp2 $now_s $before_s" 0 1 2 3 5 9 13 15
+
+sort +0.4 "$now" > "$now_s"
+sort +0.4 "$before" > "$before_s"
+
+grep '^FAIL' "$now_s" | sed 's/^....: //' >$tmp1
+grep '^PASS' "$before_s" | sed 's/^....: //' | comm -12 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Tests that now fail, but worked before:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^PASS' "$now_s" | sed 's/^....: //' >$tmp1
+grep '^FAIL' "$before_s" | sed 's/^....: //' | comm -12 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Tests that now work, but didn't before:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^FAIL' "$now_s" | sed 's/^....: //' >$tmp1
+grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^....: //' | comm -23 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "New tests that FAIL:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^PASS' "$now_s" | sed 's/^....: //' >$tmp1
+grep '^[PF]A[SI][SL]' "$before_s" | sed 's/^....: //' | comm -23 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "New tests that PASS:"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^....: //' >$tmp1
+grep '^PASS' "$before_s" | sed 's/^....: //' | comm -13 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Old tests that passed, that have disappeared: (Eeek!)"
+ echo
+ cat $tmp2
+ echo
+fi
+
+grep '^[PF]A[SI][SL]' "$now_s" | sed 's/^....: //' >$tmp1
+grep '^FAIL' "$before_s" | sed 's/^....: //' | comm -13 $tmp1 - >$tmp2
+
+grep -s . $tmp2 >/dev/null
+if [ $? = 0 ]; then
+ echo "Old tests that failed, that have disappeared: (Eeek!)"
+ echo
+ cat $tmp2
+ echo
+fi