Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /trunk/rtest/scripts/run_sh.in
ViewVC logotype

Annotation of /trunk/rtest/scripts/run_sh.in

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1182 - (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 : jhr 1180 # TODO:
8 :     # pick version of diderotc compiler to test
9 :     # pass command-line arguments to the compiler
10 :     #
11 : jhr 1178
12 : jhr 1179 # set up the path so that we can find diderotc and unu
13 :     #
14 :     PATH=/bin:/usr/bin:@TEEM_DIR@/bin:@DIDEROT_BINDIR@
15 : jhr 1178
16 :     # this script should be run from the rtest directory
17 :     #
18 :     HERE=$(pwd)
19 :     if [ ! -d $HERE/tests ] ; then
20 :     echo "run script from rtest directory"
21 :     exit 1
22 :     fi
23 :    
24 :     # get a list of all of the tests (one per directory)
25 :     #
26 :     TESTS=$(cd tests; ls)
27 :    
28 :     DATE=$( date +"%F-%H-%M-%S" )
29 : jhr 1180 LOG=$HERE/log.$DATE
30 :     REPORT=$HERE/report.$DATE
31 : jhr 1178
32 :     for t in $TESTS ; do
33 : jhr 1180 ( cd tests/$t;
34 :     echo "********** $t **********" >> $LOG
35 : jhr 1182 echo -n "checking $t ... " >> $REPORT
36 : jhr 1180 echo "diderotc $t.diderot" >> $LOG
37 :     diderotc $t.diderot 2>> $LOG 1>> $LOG
38 : jhr 1178 if [ "$?" -eq "0" ] ; then
39 : jhr 1182 echo -n "compile succeeded ... " >> $REPORT
40 : jhr 1180 echo "./$t" >> $LOG
41 :     ./$t 2>> $LOG 1>> $LOG
42 : jhr 1178 if [ "$?" -eq "0" ] ; then
43 : jhr 1182 echo -n "execution succeeded ... " >> $REPORT
44 : jhr 1180 result=$(./assess.sh)
45 :     if (($result < 1.0)) ; then
46 :     echo "result is good ($result)" >> $REPORT
47 :     echo "ok" >> $LOG
48 :     echo "$t is okay"
49 :     rm -f $t.c $t.o $t $t.log mip.txt
50 :     else
51 : jhr 1182 echo "result is bad ($result)" >> $REPORT
52 : jhr 1180 echo "$t failed"
53 :     fi
54 : jhr 1178 else
55 : jhr 1182 echo "execution failed" >> $REPORT
56 : jhr 1180 echo "$t failed"
57 : jhr 1178 fi
58 :     else
59 : jhr 1182 echo "compile failed" >> $REPORT
60 : jhr 1180 echo "$t failed"
61 : jhr 1178 fi
62 : jhr 1180 echo "**********" >> $LOG
63 :     )
64 : jhr 1178 done
65 : jhr 1180 echo "complete report at $REPORT"

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0