Changeset 26762


Ignore:
Timestamp:
01/10/22 13:59:55 (3 years ago)
Author:
jdquinn
Message:

CHG: Jenkins script was not catching MATLAB activation error; various updated to packaging scripts

Location:
issm/trunk-jpl
Files:
9 edited

Legend:

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

    r26095 r26762  
    345345EOF
    346346                cd $ISSM_DIR/test/NightlyRun
    347                 if [[ "${OS}" == CYGWIN* || ${MINGW} -eq 1 ]]; then
    348                         $MATLAB_PATH/bin/matlab -nodesktop -nosplash -nojvm -r "addpath ${ISSM_DIR_WIN}/src/m/dev; devpath; addpath ${ISSM_DIR_WIN}/nightlylog; matlab_run$i" -logfile ${ISSM_DIR_WIN}/nightlylog/matlab_log$i.log &
    349                 else
    350                         $MATLAB_PATH/bin/matlab -nodisplay -nosplash -r "addpath ${ISSM_DIR}/src/m/dev; devpath; addpath ${ISSM_DIR}/nightlylog; matlab_run$i" -logfile ${ISSM_DIR}/nightlylog/matlab_log$i.log &
    351                 fi
     347
     348                $MATLAB_PATH/bin/matlab -nodisplay -nosplash -nojvm -r "addpath ${ISSM_DIR}/src/m/dev; devpath; addpath ${ISSM_DIR}/nightlylog; matlab_run$i" &> ${ISSM_DIR}/nightlylog/matlab_log$i.log
    352349        done
    353350
     
    403400        #filter out windows characters:
    404401        cat matlab_log.log | tr -cd '\11\12\40-\176' > matlab_log.log2 && mv matlab_log.log2 matlab_log.log
     402
     403        matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab_log.log  | wc -l`
     404
     405        if [[ ${matlabExitedInError} -ne 0 ]]; then
     406                echo "----------MATLAB exited in error!----------"
     407                cat matlab_log.log
     408                echo "-----------End of matlab.log-----------"
     409
     410                # Clean up execution directory
     411                rm -rf ${ISSM_DIR}/execution/*
     412
     413                exit 1
     414        fi
    405415fi
    406416# }}}
     
    440450                cat python_log$i.log >> python_log.log
    441451        done
     452
     453        # Check that Python did not exit in error
     454        pythonExitedInError=`grep -E "Error|Standard exception|Traceback|bad interpreter" python_log.log | wc -l`
     455
     456        if [ $pythonExitedInError -ne 0 ]; then
     457                echo "----------Python exited in error!----------"
     458                cat python_log.log
     459                echo "-----------End of python_log.log-----------"
     460
     461                # Clean up execution directory
     462                rm -rf $ISSM_DIR/execution/*
     463
     464                exit 1
     465        fi
    442466fi
    443467# }}}
     
    470494                juLog -test=MATLAB-$i -name=Failure -error=FAILURE awk "/starting:${i}-/{flag=1;next}/finished:${i}-/{flag=0} flag{print}" matlab_log.log
    471495        done
    472 
    473         # Check that MATLAB did not exit in error
    474         matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab_log.log | wc -l`
    475 
    476         if [ $matlabExitedInError -ne 0 ]; then
    477                 echo "----------MATLAB exited in error!----------"
    478                 cat matlab_log.log
    479                 echo "-----------End of matlab_log.log-----------"
    480 
    481                 # Clean up execution directory
    482                 rm -rf $ISSM_DIR/execution/*
    483 
    484                 exit 1
    485         fi
    486496fi
    487497
     
    496506                juLog -test=PYTHON-$i -name=Failure -error=FAILURE awk "/starting:${i}-/{flag=1;next}/finished:${i}-/{flag=0} flag{print}" python_log.log
    497507        done
    498 
    499         # Check that Python did not exit in error
    500         pythonExitedInError=`grep -E "Error|Standard exception|Traceback|bad interpreter" python_log.log | wc -l`
    501 
    502         if [ $pythonExitedInError -ne 0 ]; then
    503                 echo "----------Python exited in error!----------"
    504                 cat python_log.log
    505                 echo "-----------End of python_log.log-----------"
    506 
    507                 # Clean up execution directory
    508                 rm -rf $ISSM_DIR/execution/*
    509 
    510                 exit 1
    511         fi
    512508fi
    513509
     
    523519                juLog -test=Example-$i -name=Failure -error=FAILURE awk "/^starting: ${i}$/{flag=1;next}/^finished: ${i}$/{flag=0} flag{print}" matlab_log_examples.log
    524520        done
    525 
    526         # Check that MATLAB did not exit in error
    527         matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab_log_examples.log | wc -l`
    528 
    529         if [ $matlabExitedInError -ne 0 ]; then
    530                 echo "----------MATLAB exited in error!----------"
    531                 cat matlab_log_examples.log
    532                 echo "-----------End of matlab_log.log-----------"
    533 
    534                 # Clean up execution directory
    535                 rm -rf $ISSM_DIR/execution/*
    536 
    537                 exit 1
    538         fi
    539521fi
    540522
  • issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-matlab.sh

    r26361 r26762  
    119119
    120120        # Run tests, redirecting output to logfile and suppressing output to console
    121         ${MATLAB_PATH}/bin/matlab -nojvm -nosplash -r "try, addpath ${ISSM_DIR}/bin ${ISSM_DIR}/lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log &> /dev/null
     121        ${MATLAB_PATH}/bin/matlab -nojvm -nosplash -nojvm -r "try, addpath ${ISSM_DIR}/bin ${ISSM_DIR}/lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" &> matlab.log
    122122
    123123        # Check that MATLAB did not exit in error
    124         matlabExitCode=`echo $?`
    125         matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run" matlab.log | wc -l`
     124        matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab.log | wc -l`
    126125
    127         if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
     126        if [ ${matlabExitedInError} -ne 0 ]; then
    128127                echo "----------MATLAB exited in error!----------"
    129128                cat matlab.log
     
    139138        numTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
    140139
    141         if [[ ${numTestsFailed} -ne 0 ]]; then
     140        if [ ${numTestsFailed} -ne 0 ]; then
    142141                echo "One or more tests FAILED"
    143142                exit 1
  • issm/trunk-jpl/packagers/mac/commit_for_signing-issm-mac-binaries-matlab.sh

    r26753 r26762  
    242242        fi
    243243done
     244
     245if [ ! -f ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE} ]; then
     246        echo "Signing timed out!"
     247        exit 1
     248fi
  • issm/trunk-jpl/packagers/mac/commit_for_signing-issm-mac-binaries-python.sh

    r26753 r26762  
    242242        fi
    243243done
     244
     245if [ ! -f ${SIGNED_REPO_COPY}/${NOTARIZATION_LOGFILE} ]; then
     246        echo "Signing timed out!"
     247        exit 1
     248fi
  • issm/trunk-jpl/packagers/mac/complete-issm-mac-binaries-matlab.sh

    r25903 r26762  
    9999        ./jenkins/jenkins.sh ./jenkins/pine_island-mac-binaries-matlab
    100100
    101         if [ $? -ne 0 ]; then
     101        if [ $? -ne 0 ]; then
     102                echo "Failure while compiling"
    102103                exit 1
    103104        fi
     
    107108if [ ${package} -eq 1 ]; then
    108109        ./packagers/mac/package-issm-mac-binaries-matlab.sh $1
    109         shift # Clear $1 so that it is not passed to commit_for_signing script
    110110
    111         if [ $? -ne 0 ]; then
     111        if [ $? -ne 0 ]; then
     112                echo "Failure during packaging"
    112113                exit 1
    113114        fi
     115
     116        shift # Clear $1 so that it is not passed to commit_for_signing script
    114117fi
    115118
     
    118121        ./packagers/mac/commit_for_signing-issm-mac-binaries-matlab.sh $1
    119122
    120         if [ $? -ne 0 ]; then
     123        if [ $? -ne 0 ]; then
     124                echo "Failure while committing package for signing"
    121125                exit 1
    122126        fi
     
    127131        ./packagers/mac/transfer-issm-mac-binaries.sh
    128132
    129         if [ $? -ne 0 ]; then
     133        if [ $? -ne 0 ]; then
     134                echo "Failure while transferring package to ISSM server"
    130135                exit 1
    131136        fi
  • issm/trunk-jpl/packagers/mac/complete-issm-mac-binaries-python.sh

    r25903 r26762  
    107107if [ ${package} -eq 1 ]; then
    108108        ./packagers/mac/package-issm-mac-binaries-python.sh $1
    109         shift # Clear $1 so that it is not passed to commit_for_signing script
    110109
    111110        if [ $? -ne 0 ]; then
    112111                exit 1
    113112        fi
     113
     114        shift # Clear $1 so that it is not passed to commit_for_signing script
    114115fi
    115116
  • issm/trunk-jpl/packagers/mac/package-issm-mac-binaries-matlab.sh

    r26753 r26762  
    133133
    134134        # Run tests, redirecting output to logfile and suppressing output to console
    135         ${MATLAB_PATH}/bin/matlab -nojvm -nosplash -r "try, addpath ${ISSM_DIR}/bin ${ISSM_DIR}/lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log &> /dev/null
     135        ${MATLAB_PATH}/bin/matlab -nojvm -nosplash -nojvm -r "try, addpath ${ISSM_DIR}/bin ${ISSM_DIR}/lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" &> matlab.log
    136136
    137137        # Check that MATLAB did not exit in error
    138         matlabExitCode=`echo $?`
    139         matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run" matlab.log | wc -l`
     138        matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab.log | wc -l`
    140139
    141         if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
     140        if [ ${matlabExitedInError} -ne 0 ]; then
    142141                echo "----------MATLAB exited in error!----------"
    143142                cat matlab.log
  • issm/trunk-jpl/packagers/mac/sign-issm-mac-binaries-matlab.sh

    r26753 r26762  
    6767# NOTE: May be able to remove this after updating macOS.
    6868#
    69 #alias svn='/usr/local/bin/svn'
     69alias svn='/usr/local/bin/svn'
    7070
    7171## Override certain other aliases
  • issm/trunk-jpl/packagers/mac/sign-issm-mac-binaries-python.sh

    r26753 r26762  
    6767# NOTE: May be able to remove this after updating macOS.
    6868#
    69 #alias svn='/usr/local/bin/svn'
     69alias svn='/usr/local/bin/svn'
    7070
    7171## Override certain other aliases
Note: See TracChangeset for help on using the changeset viewer.