--- MITgcm/verification/testreport 2008/02/09 18:30:25 1.112 +++ MITgcm/verification/testreport 2008/06/26 14:41:33 1.116 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.112 2008/02/09 18:30:25 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.116 2008/06/26 14:41:33 mlosch Exp $ # $Name: $ # @@ -19,6 +19,8 @@ echo " (-of=|-optfile=)STRING list of optfiles to use" echo " (-a|-addr) STRING list of email recipients" echo " (DEF=\"\" no email is sent)" + echo " (-mpd|-mpackdir) DIR location of the mpack utility" + echo " (DEF=\"../tools/mpack-1.6\")" echo " (-t|-tdir) STRING list of group and/or exp. dirs to test" echo " (recognized groups: basic, tutorials)" echo " (DEF=\"\" which test all)" @@ -65,7 +67,8 @@ build_mpack() { printf "building the mpack utility... " - if test ! -x "$MPACKDIR/mpack" ; then + MPACK="$MPACKDIR/mpack" + if test ! -x $MPACK ; then if test ! -d $MPACKDIR ; then echo echo "Error: can't find \"$MPACKDIR\"" @@ -88,11 +91,11 @@ else rm -f tr_build_mpack.out HAVE_MPACK=t - echo "OK" + echo "done" fi else HAVE_MPACK=t - echo "done" + echo "already exist" fi } @@ -223,7 +226,7 @@ #echo "-- ptr test=" $tst "number of var=" `echo $listVar | awk '{print NF}'` 1>&2 if test "x$tst" != xt ; then listVar=`echo "$listVar" | sed "s/ pt$ii..//g"` ; fi done - tst=`echo $sVar $listVar | awk '{ for(i=2;i<=NF;i++){t+=($i==$1)}; print t }'` + tst=`echo $sVar $listVar | awk '{ for(i=2;i<=NF;i++){if($i==$1)t+=1}; print t }'` if test $tst != 1 ; then if test $tst = 0 ; then echo "==> WARNING: selected var >$sVar< not found" 1>&2 else echo "==> WARNING: found selected var >$sVar< $tst times" 1>&2 ; fi @@ -744,7 +747,7 @@ SKIPDIRS= MPACKDIR="../tools/mpack-1.6" HAVE_MPACK= -MPACK="$MPACKDIR/mpack" +MPACK= COMMAND= if test "x$MAKE" = x ; then MAKE=make @@ -793,6 +796,10 @@ ac_prev=ADDRESSES ;; -addr=* | --addr=*) ADDRESSES=$ac_optarg ;; + -mpackdir | --mpackdir | -mpd | --mpd) + ac_prev=MPACKDIR ;; + -mpackdir=* | --mpackdir=* | -mpd=* | --mpd=*) + MPACKDIR=$ac_optarg ;; -tdir | --tdir | -t | --t) ac_prev=TESTDIRS ;; @@ -1099,7 +1106,7 @@ # Cleanup only! if test "x$CLEANUP" = xt ; then if test -r $BUILD_DIR/Makefile ; then - echo ' ------ clean dir:' $dir/build + echo ' ------ clean dir:' $dir/$builddir ( cd $BUILD_DIR ; make CLEAN ) fi if test -d $dir/$rundir/CVS ; then @@ -1248,7 +1255,7 @@ done printf "Start time: " >> $SUMMARY -echo $start_date >> $SUMMARY +echo "$start_date" >> $SUMMARY printf "End time: " >> $SUMMARY date >> $SUMMARY