SCM Repository
View of /trunk/rtest/scripts/run_sh.in
Parent Directory
|
Revision Log
Revision 1301 -
(download)
(annotate)
Thu Jun 9 23:58:40 2011 UTC (9 years, 8 months ago) by jhr
File size: 1815 byte(s)
Thu Jun 9 23:58:40 2011 UTC (9 years, 8 months ago) by jhr
File size: 1815 byte(s)
Added support for hest-based command-line arguments to trunk. Also switched output filename to prog.txt (from mip.txt)
#!/bin/ksh # # A script for running the Diderot regression tests. # # @configure_input@ # # set up the path so that we can find unu # PATH=/bin:/usr/bin:@TEEM_DIR@/bin # this script should be run from the rtest directory # HERE=$(pwd) if [ ! -d $HERE/tests ] ; then echo "run script from rtest directory" exit 1 fi # process command-line arguments # DIDEROTC="@DIDEROT_BINDIR@/diderotc" DIDEROTC_FLAGS="" while [ $# -ne 0 ] ; do case $1 in -*) DIDEROTC_FLAGS="$DIDEROTC_FLAGS $1" ;; *) if [ -x $1 ] ; then case $1 in /*) DIDEROTC=$1 ;; # absolute path *) DIDEROTC=$HERE/$1 ;; #relative path esac else echo "unrecognized argument" exit 1 fi ;; esac shift done # get a list of all of the tests (one per directory) # TESTS=$(cd tests; ls) DATE=$( date +"%F-%H-%M-%S" ) LOG=$HERE/log.$DATE REPORT=$HERE/report.$DATE echo "testing $DIDEROTC" > $REPORT for t in $TESTS ; do ( cd tests/$t; echo "********** $t **********" >> $LOG echo -n "checking $t ... " >> $REPORT echo "$DIDEROTC $DIDEROTC_FLAGS $t.diderot" >> $LOG $DIDEROTC $DIDEROTC_FLAGS $t.diderot 2>> $LOG 1>> $LOG if [ "$?" -eq "0" ] ; then echo -n "compile succeeded ... " >> $REPORT echo "./$t" >> $LOG ./$t 2>> $LOG 1>> $LOG if [ "$?" -eq "0" ] ; then echo -n "execution succeeded ... " >> $REPORT result=$(./assess.sh) if (($result < 1.0)) ; then echo "result is good ($result)" >> $REPORT echo "ok" >> $LOG echo "$t is okay" rm -f $t.c $t.o $t $t.log $t.txt else echo "result is bad ($result)" >> $REPORT echo "$t failed" fi else echo "execution failed" >> $REPORT echo "$t failed" fi else echo "compile failed" >> $REPORT echo "$t failed" fi echo "**********" >> $LOG ) done echo "complete report at $REPORT"
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |