--- MITgcm/verification/testreport 2010/11/05 16:45:02 1.148 +++ MITgcm/verification/testreport 2010/12/29 22:35:50 1.153 @@ -1,6 +1,6 @@ #! /usr/bin/env bash # -# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.148 2010/11/05 16:45:02 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/MITgcm/verification/testreport,v 1.153 2010/12/29 22:35:50 jmc Exp $ # $Name: $ # @@ -25,6 +25,8 @@ echo " (-tdir|-t) STRING list of group and/or exp. dirs to test" echo " (recognized groups: basic, tutorials)" echo " (DEF=\"\" which test all)" + echo " (if list= 'start_from THIS_EXP' then" + echo " test THIS_EXP + all the following)" echo " (-skipdir|-skd) STRING list of exp. dirs to skip" echo " (DEF=\"\" which test all)" echo " (-bash|-b) STRING preferred location of a \"bash\" or" @@ -652,7 +654,8 @@ echo " no previous $RUNLOG: assume NORMAL END" >> $RUNLOG 2>&1 fi fi - ENDVAL=`cat $RUNLOG | grep -v 'ABNORMAL END' | grep -c 'NORMAL END'` + #ENDVAL=`cat $RUNLOG | grep -v 'ABNORMAL END' | grep -c 'NORMAL END'` + ENDVAL=`tail $OUTPUTFILE | grep -c 'PROGRAM MAIN: Execution ended Normally'` fi rm -f run.log_tmp if [ $RETVAL -eq 0 -a $ENDVAL -gt 0 ] ; then @@ -1164,8 +1167,8 @@ fi else echo >> $SUMMARY - echo "No \"OPTFILE\" was explicitly specified by testreport," >> $SUMMARY - echo " so the genmake default will be used." >> $SUMMARY + echo "No \"OPTFILE\" was specified ; genmake2 found and uses:" >> $SUMMARY + #-note: to be filled later after 1rst run fi echo echo >> $SUMMARY @@ -1390,7 +1393,28 @@ mkOpt=`grep '^# OPTFILE=' $dir/$builddir/Makefile 2>/dev/null | head -1 | sed 's/^# //'` echo "from '$dir/$builddir/Makefile', extract:" > $DRESULTS/genmake_state sed -n '/^# executed by:/,+1 p' $dir/$builddir/Makefile >> $DRESULTS/genmake_state - echo $mkOpt >> $DRESULTS/genmake_state + echo " $mkOpt" >> $DRESULTS/genmake_state + if test "x$OPTFILE" = xNONE ; then + eval $mkOpt + sed "/^No \"OPTFILE\" was specified ; genmake2/a\ OPTFILE=${OPTFILE}"\ + $SUMMARY > tr_0.tmp_log + RETVAL=$? + if test "x$RETVAL" = x0 ; then rm -f $SUMMARY + cp tr_0.tmp_log $SUMMARY + else rm -f tr_0.tmp_log + fi + fi + gmkLog=$dir/$builddir/genmake.log + grep '^Get compiler version using:' $gmkLog > /dev/null 2>&1 + RETVAL=$? + if test "x$RETVAL" = x0 ; then + echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state + sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \ + | grep -v '^... compiler version ' > tr_1.tmp_log + sed -n '1,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \ + >> $DRESULTS/genmake_state + rm -f tr_1.tmp_log + fi fi fi #postclean $dir/$builddir