/[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.2 by edhill, Mon Sep 1 16:50:27 2003 UTC revision 1.5 by edhill, Sat Sep 6 02:45:07 2003 UTC
# Line 13  usage() Line 13  usage()
13      echo "  (-optfile=|-of=)STRING   list of genmake2 \"optfiles\""      echo "  (-optfile=|-of=)STRING   list of genmake2 \"optfiles\""
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 "  (-t|-tdir)STRING         list of \"test\" dirs"
16        echo "  (-b|-bash)STRING         the \"bash\" executable"
17        echo "  (-m|-make)STRING         the \"make\" executable"
18      echo      echo
19      exit 1      exit 1
20  }  }
# Line 29  build_mpack() Line 31  build_mpack()
31              exit 1              exit 1
32          fi          fi
33          echo -n "building mpack...  "          echo -n "building mpack...  "
34          ( cd $MPACKDIR && ./configure && make ) > build_mpack.out 2>&1          ( cd $MPACKDIR && ./configure && $MAKE ) > build_mpack.out 2>&1
35          RETVAL=$?          RETVAL=$?
36          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
37              echo              echo
# Line 160  testoutput() Line 162  testoutput()
162  genmakemodel()  genmakemodel()
163  {  {
164      # genmakemodel directory      # genmakemodel directory
165      GENMAKE2="../../../tools/genmake2"      GENMAKE2="$BASH ../../../tools/genmake2"
166      (      (
167          cd $1;          cd $1;
168          printf 'genmake ... ' 1>&2          printf 'genmake ... ' 1>&2
169          # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1          # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1
170          $GENMAKE2  -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1          $GENMAKE2 -make $MAKE -ds --mods=../code "--optfile="$OPTFILE > make.log 2>&1
171          RETVAL=$?          RETVAL=$?
172          for i in gm_state gm_optfile gm_local Makefile ; do          for i in gm_state gm_optfile gm_local Makefile ; do
173              if test -r $i ; then              if test -r $i ; then
# Line 191  makeclean() Line 193  makeclean()
193          rm -f output.txt          rm -f output.txt
194          printf 'make CLEAN ... ' 2>&1          printf 'make CLEAN ... ' 2>&1
195          if test -r Makefile ; then          if test -r Makefile ; then
196              make CLEAN >> make.log 2>&1              $MAKE CLEAN >> make.log 2>&1
197              RETVAL=$?              RETVAL=$?
198              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
199                  tail make.log                  tail make.log
# Line 211  makedependmodel() Line 213  makedependmodel()
213      (      (
214          cd $1;          cd $1;
215          printf 'make depend ... ' 1>&2          printf 'make depend ... ' 1>&2
216          make depend >> make.log 2>&1          $MAKE depend >> make.log 2>&1
217          RETVAL=$?          RETVAL=$?
218          if test "x$RETVAL" != x0 ; then          if test "x$RETVAL" != x0 ; then
219              tail make.log              tail make.log
# Line 231  makemodel() Line 233  makemodel()
233          cd $1;          cd $1;
234          if test -r Makefile ; then          if test -r Makefile ; then
235              printf 'make ... ' 1>&2              printf 'make ... ' 1>&2
236              make >> make.log 2>&1              $MAKE >> make.log 2>&1
237              RETVAL=$?              RETVAL=$?
238              if test "x$RETVAL" != x0 ; then              if test "x$RETVAL" != x0 ; then
239                  tail make.log                  tail make.log
# Line 267  runmodel() Line 269  runmodel()
269                  rm -f output.txt                  rm -f output.txt
270              fi              fi
271              printf 'runmodel: ' 1>&2              printf 'runmodel: ' 1>&2
272              make output.txt              $MAKE output.txt
273              RETVAL=$?              RETVAL=$?
274              if test "x$RETVAL" = x0 ; then              if test "x$RETVAL" = x0 ; then
275                  cp output.txt $CDIR"/output.txt"                  cp output.txt $CDIR"/output.txt"
# Line 315  EOFA Line 317  EOFA
317          return 0          return 0
318      else      else
319          echo          echo
320          echo "createcodelet: failed to compile codelet" | tee          echo "createcodelet: failed to compile codelet"
321          exit 1          exit 1
322      fi      fi
323  }  }
# Line 388  clean=0 Line 390  clean=0
390  ieee=1  ieee=1
391  expts=''  expts=''
392    
393    BASH=
394  OPTFILES=  OPTFILES=
395  ADDRESSES=edhill@mitgcm.org  ADDRESSES=edhill@mitgcm.org
396  TESTDIRS=  TESTDIRS=
397  MPACKDIR="../tools/mpack-1.6"  MPACKDIR="../tools/mpack-1.6"
398  MPACK="$MPACKDIR/mpack"  MPACK="$MPACKDIR/mpack"
399    MAKE=make
400    
401  echo -n "parsing options...  "  echo -n "parsing options...  "
402    
# Line 428  for ac_option ; do Line 432  for ac_option ; do
432          -tdir=* | --tdir=*)          -tdir=* | --tdir=*)
433              TESTDIRS=$ac_optarg ;;              TESTDIRS=$ac_optarg ;;
434    
435            -bash | --bash | -b | --b)
436                ac_prev=BASH ;;
437            -bash=* | --bash=*)
438                BASH=$ac_optarg ;;
439    
440            -make | --make | -m | --m)
441                ac_prev=MAKE ;;
442            -make=* | --make=*)
443                MAKE=$ac_optarg ;;
444    
445          -quick) quick=1 ;;          -quick) quick=1 ;;
446          -verbose) verbose=2 ;;          -verbose) verbose=2 ;;
447          -debug) debug=1 ;;          -debug) debug=1 ;;
# Line 505  for OPTFILE in $OPTFILES ; do Line 519  for OPTFILE in $OPTFILES ; do
519            
520      #  ...and each test directory...      #  ...and each test directory...
521      for dir in $TESTDIRS ; do      for dir in $TESTDIRS ; do
522    
523            #  Verify that the testdir exists and contains previous
524            #  results in the correct location--or skip this directory!
525            if test ! -r $dir"/results/output.txt" ; then
526                echo | tee -a $SUMMARY
527                echo "can't read \"$dir/results/output.txt\" -- skipping $dir" \
528                    | tee -a $SUMMARY
529                continue
530            fi
531                    
532          #  Create an output dir for each OPTFILE/tdir combination          #  Create an output dir for each OPTFILE/tdir combination
533          CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR          CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR
# Line 530  for OPTFILE in $OPTFILES ; do Line 553  for OPTFILE in $OPTFILES ; do
553              rundir=input              rundir=input
554          fi          fi
555    
         #  Verify that the testdir exists and contains previous  
         #  results in the correct location--or skip this directory!  
         if test ! -r $dir"/results/output.txt" ; then  
             echo | tee $SUMMARY  
             echo "can't read \"$dir/results/output.txt\" -- skipping $dir" \  
                 | tee $SUMMARY  
             continue  
         fi  
   
556          genmakemodel $dir/$builddir && genmake=Y \          genmakemodel $dir/$builddir && genmake=Y \
557              && makeclean $dir/$builddir \              && makeclean $dir/$builddir \
558              && makedependmodel $dir/$builddir && makedepend=Y \              && makedependmodel $dir/$builddir && makedepend=Y \

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.22