Merged revisions 143552,143554,143557,143560,143562,143564-143567,143570-143573,14357...
[official-gcc.git] / contrib / reghunt / examples / testall
blob61d99e0b6a6607d382827e382113c774f1ca4535
1 #! /bin/sh
3 # Run one or more regression hunts
5 # The file specified as the single argument is a queue of regression
6 # hunts and/or lists of patches to test. Each entry in the file is
7 # "hunt" or "test" followed by a bugid for which there is a config
8 # file and other required files (patch list and test source file).
9 # Each line of the file is removed as it is processed, and new ones
10 # can be added while the script is still running.
12 #set -ex
14 if [ $# != 1 ]; then
15 echo "usage: $0 testfile"
16 exit 1
19 REGFILE=$1
20 TMPFILE=testall.tmp
22 if [ ! -f $REGFILE ]; then
23 echo "$0: file $REGFILE does not exist"
24 exit 1
27 RETURN_FOR_TEST=return
28 RETURN_FOR_TEST=true
30 . ../gcc-svn-env
32 hunt() {
33 id=$1
35 echo regression hunt for $id
36 $RETURN_FOR_TEST
37 $REG_CLEANUP
38 reg-hunt $id.config >> $id.log 2>&1
39 tail -n 1 $id.log
40 #tail -n 1 $id.log | mutt -s "reghunt for $id finished" janis187
43 testit() {
44 id=$1
46 echo testing specific dates for $id
47 $RETURN_FOR_TEST
48 $REG_CLEANUP
49 reg-test $id.config >> $id.log 2>&1
50 #mutt -s "reg-test for $id finished" janis187 < /dev/null
53 rm -f $REG_STOP
55 while
56 read WHICH ID < $REGFILE
58 if [ -f $REG_STOP ]; then
59 echo "$REG_STOP detected"
60 rm -f $REG_STOP
61 exit 1
64 sed 1d < $REGFILE > $TMPFILE
65 mv $TMPFILE $REGFILE
67 case $WHICH in
68 hunt) hunt $ID;;
69 test) testit $ID;;
70 *) echo "unknown action $WHICH, skipping $ID";;
71 esac
72 echo
73 done