SCM Repository
Annotation of /trunk/rtest/scripts/run_sh.in
Parent Directory
|
Revision Log
Revision 1199 - (view) (download)
1 : | jhr | 1180 | #!/bin/ksh |
2 : | jhr | 1178 | # |
3 : | # A script for running the Diderot regression tests. | ||
4 : | # | ||
5 : | # @configure_input@ | ||
6 : | # | ||
7 : | |||
8 : | jhr | 1199 | # set up the path so that we can find unu |
9 : | jhr | 1179 | # |
10 : | jhr | 1199 | PATH=/bin:/usr/bin:@TEEM_DIR@/bin |
11 : | jhr | 1178 | |
12 : | # this script should be run from the rtest directory | ||
13 : | # | ||
14 : | HERE=$(pwd) | ||
15 : | if [ ! -d $HERE/tests ] ; then | ||
16 : | echo "run script from rtest directory" | ||
17 : | exit 1 | ||
18 : | fi | ||
19 : | |||
20 : | jhr | 1185 | # process command-line arguments |
21 : | # | ||
22 : | DIDEROTC="@DIDEROT_BINDIR@/diderotc" | ||
23 : | DIDEROTC_FLAGS="" | ||
24 : | while [ $# -ne 0 ] ; do | ||
25 : | case $1 in | ||
26 : | -*) DIDEROTC_FLAGS="$DIDEROTC_FLAGS $1" ;; | ||
27 : | *) if [ -x $1 ] ; then | ||
28 : | jhr | 1199 | case $1 in |
29 : | /*) DIDEROTC=$1 ;; # absolute path | ||
30 : | *) DIDEROTC=$HERE/$1 ;; #relative path | ||
31 : | esac | ||
32 : | jhr | 1185 | else |
33 : | echo "unrecognized argument" | ||
34 : | exit 1 | ||
35 : | fi | ||
36 : | ;; | ||
37 : | esac | ||
38 : | shift | ||
39 : | done | ||
40 : | |||
41 : | jhr | 1178 | # get a list of all of the tests (one per directory) |
42 : | # | ||
43 : | TESTS=$(cd tests; ls) | ||
44 : | |||
45 : | DATE=$( date +"%F-%H-%M-%S" ) | ||
46 : | jhr | 1180 | LOG=$HERE/log.$DATE |
47 : | REPORT=$HERE/report.$DATE | ||
48 : | jhr | 1178 | |
49 : | jhr | 1185 | echo "testing $DIDEROTC" > $REPORT |
50 : | jhr | 1178 | for t in $TESTS ; do |
51 : | jhr | 1180 | ( cd tests/$t; |
52 : | echo "********** $t **********" >> $LOG | ||
53 : | jhr | 1182 | echo -n "checking $t ... " >> $REPORT |
54 : | jhr | 1185 | echo "$DIDEROTC $DIDEROTC_FLAGS $t.diderot" >> $LOG |
55 : | $DIDEROTC $DIDEROTC_FLAGS $t.diderot 2>> $LOG 1>> $LOG | ||
56 : | jhr | 1178 | if [ "$?" -eq "0" ] ; then |
57 : | jhr | 1182 | echo -n "compile succeeded ... " >> $REPORT |
58 : | jhr | 1180 | echo "./$t" >> $LOG |
59 : | ./$t 2>> $LOG 1>> $LOG | ||
60 : | jhr | 1178 | if [ "$?" -eq "0" ] ; then |
61 : | jhr | 1182 | echo -n "execution succeeded ... " >> $REPORT |
62 : | jhr | 1180 | result=$(./assess.sh) |
63 : | if (($result < 1.0)) ; then | ||
64 : | echo "result is good ($result)" >> $REPORT | ||
65 : | echo "ok" >> $LOG | ||
66 : | echo "$t is okay" | ||
67 : | rm -f $t.c $t.o $t $t.log mip.txt | ||
68 : | else | ||
69 : | jhr | 1182 | echo "result is bad ($result)" >> $REPORT |
70 : | jhr | 1180 | echo "$t failed" |
71 : | fi | ||
72 : | jhr | 1178 | else |
73 : | jhr | 1182 | echo "execution failed" >> $REPORT |
74 : | jhr | 1180 | echo "$t failed" |
75 : | jhr | 1178 | fi |
76 : | else | ||
77 : | jhr | 1182 | echo "compile failed" >> $REPORT |
78 : | jhr | 1180 | echo "$t failed" |
79 : | jhr | 1178 | fi |
80 : | jhr | 1180 | echo "**********" >> $LOG |
81 : | ) | ||
82 : | jhr | 1178 | done |
83 : | jhr | 1180 | echo "complete report at $REPORT" |
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |