/[MITgcm]/MITgcm/verification/testreport
ViewVC logotype

Diff of /MITgcm/verification/testreport

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.4 by edhill, Wed Sep 3 20:02:47 2003 UTC revision 1.6 by edhill, Wed Sep 10 02:30:37 2003 UTC
# Line 10  usage() Line 10  usage()
10      echo      echo
11      echo "where possible OPTIONS are:"      echo "where possible OPTIONS are:"
12      echo "  (-help|-h)               print usage"      echo "  (-help|-h)               print usage"
13      echo "  (-optfile=|-of=)STRING   list of genmake2 \"optfiles\""      echo "  (-optfile=|-of=)STRING   list of optfiles to use"
14      echo "  (-a|-addr)STRING         list of email recipients"      echo "  (-a|-addr)STRING         list of email recipients"
15      echo "  (-t|-tdir)STRING         list of \"test\" dirs"      echo "                             (DEF=\"edhill@mitgcm.org\")"
16        echo "  (-t|-tdir)STRING         list of test dirs to use"
17        echo "                             (DEF=\"\" which builds all)"
18      echo "  (-b|-bash)STRING         location of \"bash\" executable"      echo "  (-b|-bash)STRING         location of \"bash\" executable"
19        echo "                             (DEF=\"\" for \"/bin/bash\")"
20        echo "  (-c|-command)STRING      command to run"
21        echo "                             (DEF=\"make output.txt\")"
22        echo
23        echo "and where STRING follows a whitespace-delimited format"
24        echo "such as:"
25        echo "  -t 'exp0 exp2 exp3' "
26        echo "  -addr='abc@123.com testing@home.org'"
27      echo      echo
28      exit 1      exit 1
29  }  }
# Line 189  makeclean() Line 199  makeclean()
199      # makeclean directory      # makeclean directory
200      (      (
201          cd $1;          cd $1;
202          rm -f output.txt          if test -e output.txt ; then
203                rm -f output.txt
204            fi
205          printf 'make CLEAN ... ' 2>&1          printf 'make CLEAN ... ' 2>&1
206          if test -r Makefile ; then          if test -r Makefile ; then
207              make CLEAN >> make.log 2>&1              make CLEAN >> make.log 2>&1
# Line 258  linkdata() Line 270  linkdata()
270    
271  runmodel()  runmodel()
272  {  {
273      # runmodel directory exe      # runmodel directory
274      #      #
275      #  runs the model "exe" in "directory" (exe is relative to directory)      #  runs "$COMMAND" in "directory"
276        #  (where "$COMMAND" is relative to "directory")
277      (      (
278          cd $1          cd $1
279          if [ -x $2 ]; then          printf 'runmodel: ' 1>&2
280              if [ $quick -eq 0 ]; then          # make output.txt
281                  rm -f output.txt          $COMMAND
282              fi          RETVAL=$?
283              printf 'runmodel: ' 1>&2          if test "x$RETVAL" = x0 ; then
284              make output.txt              cp output.txt $CDIR"/output.txt"
285              RETVAL=$?              return 0
286              if test "x$RETVAL" = x0 ; then          else
287                  cp output.txt $CDIR"/output.txt"              return 1
                 return 0  
             else  
                 return 1  
             fi  
288          fi          fi
289      )      )
290  }  }
# Line 384  scandirs() Line 393  scandirs()
393  #  Default properties  #  Default properties
394  debug=0  debug=0
395  verbose=1  verbose=1
 quick=0  
396  clean=0  clean=0
 ieee=1  
397  expts=''  expts=''
398    # ieee=1
399    # quick=0
400    
401  BASH=  BASH=
402  OPTFILES=  OPTFILES=
# Line 395  ADDRESSES=edhill@mitgcm.org Line 404  ADDRESSES=edhill@mitgcm.org
404  TESTDIRS=  TESTDIRS=
405  MPACKDIR="../tools/mpack-1.6"  MPACKDIR="../tools/mpack-1.6"
406  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
407    COMMAND="make output.txt"
408    
409  echo -n "parsing options...  "  echo -n "parsing options...  "
410    
# Line 435  for ac_option ; do Line 445  for ac_option ; do
445          -bash=* | --bash=*)          -bash=* | --bash=*)
446              BASH=$ac_optarg ;;              BASH=$ac_optarg ;;
447    
448          -quick) quick=1 ;;          -command | --command | -c | --c)
449                ac_prev=COMMAND ;;
450            -command=* | --command=*)
451                COMMAND=$ac_optarg ;;
452    
453          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
454          -debug) debug=1 ;;          -debug) debug=1 ;;
455          -clean) clean=1 ;;          -clean) clean=1 ;;
         -noieee) ieee=0 ;;  
456          -quiet) verbose=0 ;;          -quiet) verbose=0 ;;
457    
458          -*)          -*)
# Line 551  for OPTFILE in $OPTFILES ; do Line 564  for OPTFILE in $OPTFILES ; do
564              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \
565              && makemodel $dir/$builddir && make=Y \              && makemodel $dir/$builddir && make=Y \
566              && linkdata $seperatebuilddir $dir/$rundir \              && linkdata $seperatebuilddir $dir/$rundir \
567              && runmodel $dir/$builddir mitgcmuv && run=Y \              && runmodel $dir/$builddir && run=Y \
568              && results=`testoutput $dir $rundir`              && results=`testoutput $dir $rundir`
569          echo          echo
570          formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \          formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22