Changeset 26817


Ignore:
Timestamp:
01/25/22 12:30:43 (3 years ago)
Author:
jdquinn
Message:

BUG: Reverting position of error log checks so that test failures are parsed correctly

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/jenkins/jenkins.sh

    r26785 r26817  
    419419        #filter out windows characters:
    420420        cat matlab_log.log | tr -cd '\11\12\40-\176' > matlab_log.log2 && mv matlab_log.log2 matlab_log.log
    421 
    422         matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab_log.log  | wc -l`
    423 
    424         if [[ ${matlabExitedInError} -ne 0 ]]; then
    425                 echo "----------MATLAB exited in error!----------"
    426                 cat matlab_log.log
    427                 echo "-----------End of matlab.log-----------"
    428 
    429                 # Clean up execution directory
    430                 rm -rf ${ISSM_DIR}/execution/*
    431 
    432                 exit 1
    433         fi
    434421fi
    435422# }}}
     
    469456                cat python_log$i.log >> python_log.log
    470457        done
    471 
    472         # Check that Python did not exit in error
    473         pythonExitedInError=`grep -E "Error|Standard exception|Traceback|bad interpreter" python_log.log | wc -l`
    474 
    475         if [ $pythonExitedInError -ne 0 ]; then
    476                 echo "----------Python exited in error!----------"
    477                 cat python_log.log
    478                 echo "-----------End of python_log.log-----------"
    479 
    480                 # Clean up execution directory
    481                 rm -rf $ISSM_DIR/execution/*
    482 
    483                 exit 1
    484         fi
    485458fi
    486459# }}}
     
    513486                juLog -test=MATLAB-$i -name=Failure -error=FAILURE awk "/starting:${i}-/{flag=1;next}/finished:${i}-/{flag=0} flag{print}" matlab_log.log
    514487        done
     488
     489        # Check that MATLAB did not exit in error
     490        matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab_log.log | wc -l`
     491
     492        if [ $matlabExitedInError -ne 0 ]; then
     493                echo "----------MATLAB exited in error!----------"
     494                cat matlab_log.log
     495                echo "-----------End of matlab_log.log-----------"
     496
     497                # Clean up execution directory
     498                rm -rf $ISSM_DIR/execution/*
     499
     500                exit 1
     501        fi
    515502fi
    516503
     
    525512                juLog -test=PYTHON-$i -name=Failure -error=FAILURE awk "/starting:${i}-/{flag=1;next}/finished:${i}-/{flag=0} flag{print}" python_log.log
    526513        done
     514
     515        # Check that Python did not exit in error
     516        pythonExitedInError=`grep -E "Error|Standard exception|Traceback|bad interpreter" python_log.log | wc -l`
     517
     518        if [ $pythonExitedInError -ne 0 ]; then
     519                echo "----------Python exited in error!----------"
     520                cat python_log.log
     521                echo "-----------End of python_log.log-----------"
     522
     523                # Clean up execution directory
     524                rm -rf $ISSM_DIR/execution/*
     525
     526                exit 1
     527        fi
    527528fi
    528529
     
    538539                juLog -test=Example-$i -name=Failure -error=FAILURE awk "/^starting: ${i}$/{flag=1;next}/^finished: ${i}$/{flag=0} flag{print}" matlab_log_examples.log
    539540        done
     541
     542        # Check that MATLAB did not exit in error
     543        matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab_log_examples.log | wc -l`
     544
     545        if [ $matlabExitedInError -ne 0 ]; then
     546                echo "----------MATLAB exited in error!----------"
     547                cat matlab_log_examples.log
     548                echo "-----------End of matlab_log.log-----------"
     549
     550                # Clean up execution directory
     551                rm -rf $ISSM_DIR/execution/*
     552
     553                exit 1
     554        fi
    540555fi
    541556
Note: See TracChangeset for help on using the changeset viewer.