SCM Repository
[diderot] / trunk / rtest / scripts / run-one_sh.in |
View of /trunk/rtest/scripts/run-one_sh.in
Parent Directory
|
Revision Log
Revision 1765 -
(download)
(annotate)
Sat Mar 24 10:08:44 2012 UTC (8 years, 10 months ago) by jhr
File size: 2076 byte(s)
Sat Mar 24 10:08:44 2012 UTC (8 years, 10 months ago) by jhr
File size: 2076 byte(s)
Minor improvements to regression testing scripts
#!/bin/ksh # # A script for running a single Diderot regression test # # usage: # scripts/run-one.sh test [diderotc] [flags] # # @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 # get the name of the test to run # if (( $# >= 1 )) ; then RTEST=$1 shift if [ ! -d tests/$RTEST ] ; then echo "$RTEST is not a valid regression-test name" exit 1 fi else usage 1 fi # process the rest of the 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 DATE=$( date +"%F-%H-%M-%S" ) LOG=$HERE/log-$RTEST.$DATE REPORT=$HERE/report-$RTEST.$DATE echo "testing $DIDEROTC" > $REPORT ( cd tests/$RTEST; echo "********** $RTEST **********" >> $LOG echo -n "checking $RTEST ... " >> $REPORT echo "$DIDEROTC $DIDEROTC_FLAGS $RTEST.diderot" >> $LOG $DIDEROTC $DIDEROTC_FLAGS $RTEST.diderot 2>> $LOG 1>> $LOG if [ "$?" -eq "0" ] ; then echo -n "compile succeeded ... " >> $REPORT echo "./$RTEST" >> $LOG ./$RTEST 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 "$RTEST is okay" rm -f $RTEST.c $RTEST.cl $RTEST.o $RTEST $RTEST.log $RTEST.txt else echo "result is bad ($result)" >> $REPORT echo "$RTEST failed" fi else echo "execution failed" >> $REPORT echo "$RTEST failed" fi else echo "compile failed" >> $REPORT echo "$RTEST failed" fi echo "**********" >> $LOG ) echo "complete report at $REPORT"
root@smlnj-gforge.cs.uchicago.edu | ViewVC Help |
Powered by ViewVC 1.0.0 |