SCM Repository
View of /branches/lamont/rtest/scripts/run_sh.in
Parent Directory
|
Revision Log
Revision 2081 -
(download)
(annotate)
Mon Nov 5 23:26:06 2012 UTC (9 years, 6 months ago) by lamonts
File size: 2591 byte(s)
Mon Nov 5 23:26:06 2012 UTC (9 years, 6 months ago) by lamonts
File size: 2591 byte(s)
Creating new developmented branch based on vis12
#!/bin/ksh # # A script for running the Diderot regression tests. # # usage: # scripts/run.sh [diderotc] [diderotc-flags] [-- runtime-flags] # # @configure_input@ # # set up the path so that we can find unu # PATH=/bin:/usr/bin:@TEEM_DIR@/bin function usage { echo "usage:" echo " scripts/run.sh [diderotc] [diderotc-flags] [-- runtime-flags]" exit $1 } # 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="--exec" RUNTIME_FLAGS="" if [ $# -ne 0 ] ; then # first we check for the diderotc command case $1 in -*) ;; # no diderot command /*) DIDEROTC=$1; shift ;; # absolute path *) DIDEROTC=$HERE/$1; shift ;; #relative path esac # get diderotc flags while [ $# -ne 0 ] ; do case $1 in --) shift; break ;; # switch modes -*) DIDEROTC_FLAGS="$DIDEROTC_FLAGS $1" ;; *) echo "unrecognized argument" usage 1 ;; esac shift done # get runtime flags while [ $# -ne 0 ] ; do case $1 in -*) RUNTIME_FLAGS="$RUNTIME_FLAGS $1" ;; *) echo "unrecognized argument" usage 1 ;; esac shift done fi # # check that the diderotc path is valid # if [ ! -x $DIDEROTC ] ; then echo "$DIDEROTC is not executable or does not exist" exit 1 fi # 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 $DIDEROTC_FLAGS" > $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 $RUNTIME_FLAGS" >> $LOG ./$t $RUNTIME_FLAGS 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.cl $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 |