--- MITgcm/verification/testreport 2004/03/12 18:51:05 1.37 +++ MITgcm/verification/testreport 2004/07/06 20:14:32 1.41 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.37 2004/03/12 18:51:05 edhill Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.41 2004/07/06 20:14:32 edhill Exp $ # $Name: $ # @@ -13,7 +13,7 @@ echo " (-help|-h) print usage" echo " (-mpi) use MPI input files" echo " (-ieee|-noieee) if possible, use IEEE compiler flags" - echo " (DEF=\"noieee\")" + echo " (DEF=\"-ieee\")" echo " (-optfile=|-of=)STRING list of optfiles to use" echo " (-a|-addr) STRING list of email recipients" echo " (DEF=\"edhill@mitgcm.org\")" @@ -32,6 +32,7 @@ echo " (-nogenmake|-ng) skip the genmake stage" echo " (-noclean|-nc) skip the \"make clean\" stage" echo " (-nodepend|-nd) skip the \"make depend\" stage" + echo " (-deldir|-dd) on success, delete the output directory" echo echo "and where STRING follows a whitespace-delimited format" echo "such as:" @@ -413,7 +414,10 @@ cd $1 printf 'runmodel ... ' 1>&2 # make output.txt - ( $COMMAND ) >> run.log 2>&1 + echo + # echo "COMMAND='$COMMAND'" + # echo "pwd='"`pwd`"'" + ( eval $COMMAND ) >> run.log 2>&1 RETVAL=$? if test "x$RETVAL" = x0 ; then echo successful 1>&2 @@ -542,7 +546,7 @@ expts='' # ieee=1 -IEEE= +IEEE=true if test "x$MITGCM_IEEE" != x ; then IEEE=$MITGCM_IEEE fi @@ -564,6 +568,7 @@ COMMAND= MAKE=make MPI=f +DELDIR= ADM= @@ -639,6 +644,8 @@ -debug) debug=1 ;; -quiet) verbose=0 ;; + -deldir | -dd) DELDIR=t ;; + -*) echo "Error: unrecognized option: "$ac_option usage @@ -880,7 +887,7 @@ ln -s ../$builddir/mitgcmuv mitgcmuv ) runmodel $dir/tr_run && run=Y \ - && results=`testoutput $dir $rundir "."$ex` + && results=`testoutput $dir tr_run "."$ex` fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` fres=`formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N} $results` fres="$fres.$ex" @@ -952,3 +959,7 @@ cat $SUMMARY > tr_out.txt fi +if test "x$DELDIR" = xt ; then + rm -rf $DRESULTS +fi +