
#======================================================================
# Setup
#======================================================================

cd $CASEROOT

set STOP_N      = `./xmlquery STOP_N      -value`
set STOP_OPTION = `./xmlquery STOP_OPTION -value`

./xmlchange -file env_run.xml -id CONTINUE_RUN -val FALSE
./xmlchange -file env_run.xml -id REST_OPTION  -val none

#======================================================================
# do a run and just look at performance
#======================================================================

cd $CASEROOT
echo "doing a ${STOP_N} ${STOP_OPTION} test with no restart files" >>& $TESTSTATUS_LOG 

./$CASE.run
if ($status != 0) then
    echo " ERROR: $CASE.run failed" >>& $TESTSTATUS_LOG
    exit -1
endif

set CplLogFile = `ls -1t $RUNDIR/cpl.log* | head -1`
if (-e $CplLogFile) then
   set pass = `zgrep "SUCCESSFUL TERMINATION" $CplLogFile | wc -l`
   if ($pass != 1) then
       echo "ERROR: coupler log $CplLogFile indicates model run failed" >>& $TESTSTATUS_LOG
       echo "" >>& $TESTSTATUS_LOG
       exit -1;
    else 
       echo "Success: test log is $CplLogFile" >>& $TESTSTATUS_LOG 
       echo "" >>& $TESTSTATUS_LOG 
    endif
else
   echo "ERROR: no coupler log created, model run failed" >>& $TESTSTATUS_LOG
   exit -1;
endif

#======================================================================
# Check test success
#======================================================================

echo "DONE ${CASEBASEID} : (test finished, successful coupler log) " >>& $TESTSTATUS_LOG
echo "" >>& $TESTSTATUS_LOG

echo "this test just measures performance - so there are no PASS/FAIL metrics"



