/[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.5 by edhill, Sat Sep 6 02:45:07 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 "  (-b|-bash)STRING         the \"bash\" executable"      echo "  (-t|-tdir)STRING         list of test dirs to use"
17      echo "  (-m|-make)STRING         the \"make\" executable"      echo "                             (DEF=\"\" which builds all)"
18        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 31  build_mpack() Line 40  build_mpack()
40              exit 1              exit 1
41          fi          fi
42          echo -n "building mpack...  "          echo -n "building mpack...  "
43          ( cd $MPACKDIR && ./configure && $MAKE ) > build_mpack.out 2>&1          ( cd $MPACKDIR && ./configure && make ) > build_mpack.out 2>&1
44          RETVAL=$?          RETVAL=$?
45          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
46              echo              echo
# Line 167  genmakemodel() Line 176  genmakemodel()
176          cd $1;          cd $1;
177          printf 'genmake ... ' 1>&2          printf 'genmake ... ' 1>&2
178          # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1          # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1
179          $GENMAKE2 -make $MAKE -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1          $GENMAKE2  -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1
180          RETVAL=$?          RETVAL=$?
181          for i in gm_state gm_optfile gm_local Makefile ; do          for i in gm_state gm_optfile gm_local Makefile ; do
182              if test -r $i ; then              if test -r $i ; then
# Line 190  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
208              RETVAL=$?              RETVAL=$?
209              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
210                  tail make.log                  tail make.log
# Line 213  makedependmodel() Line 224  makedependmodel()
224      (      (
225          cd $1;          cd $1;
226          printf 'make depend ... ' 1>&2          printf 'make depend ... ' 1>&2
227          $MAKE depend >> make.log 2>&1          make depend >> make.log 2>&1
228          RETVAL=$?          RETVAL=$?
229          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
230              tail make.log              tail make.log
# Line 233  makemodel() Line 244  makemodel()
244          cd $1;          cd $1;
245          if test -r Makefile ; then          if test -r Makefile ; then
246              printf 'make ... ' 1>&2              printf 'make ... ' 1>&2
247              $MAKE >> make.log 2>&1              make >> make.log 2>&1
248              RETVAL=$?              RETVAL=$?
249              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
250                  tail make.log                  tail make.log
# Line 259  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 385  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 396  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  MAKE=make  COMMAND="make output.txt"
408    
409  echo -n "parsing options...  "  echo -n "parsing options...  "
410    
# Line 437  for ac_option ; do Line 445  for ac_option ; do
445          -bash=* | --bash=*)          -bash=* | --bash=*)
446              BASH=$ac_optarg ;;              BASH=$ac_optarg ;;
447    
448          -make | --make | -m | --m)          -command | --command | -c | --c)
449              ac_prev=MAKE ;;              ac_prev=COMMAND ;;
450          -make=* | --make=*)          -command=* | --command=*)
451              MAKE=$ac_optarg ;;              COMMAND=$ac_optarg ;;
452    
         -quick) quick=1 ;;  
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 558  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.5  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22