Changeset 24702
- Timestamp:
- 04/08/20 09:47:20 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/packagers/linux/package-issm-linux-binaries-with_dakota.sh
r24701 r24702 49 49 cp ${LIBGFORTRAN} ${LIBGFORTRAN_DIST} 2> /dev/null 50 50 51 # Run tests52 echo "Running tests"53 cd ${ISSM_DIR}/test/NightlyRun51 # # Run tests 52 # echo "Running tests" 53 # cd ${ISSM_DIR}/test/NightlyRun 54 54 55 # Check that MATLAB tests run56 echo "Running MATLAB tests"55 # # Check that MATLAB tests run 56 # echo "Running MATLAB tests" 57 57 58 rm matlab.log 2> /dev/null58 # rm matlab.log 2> /dev/null 59 59 60 # Run MATLAB tests redirecting output to logfile and suppressing output to console61 ${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/null60 # # Run MATLAB tests redirecting output to logfile and suppressing output to console 61 # ${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 62 62 63 # Check that MATLAB did not exit in error64 matlabExitCode=`echo $?`65 matlabExitedInError=`grep -E "Activation cannot proceed|license" matlab.log | wc -l`63 # # Check that MATLAB did not exit in error 64 # matlabExitCode=`echo $?` 65 # matlabExitedInError=`grep -E "Activation cannot proceed|license" matlab.log | wc -l` 66 66 67 if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then68 echo "----------MATLAB exited in error!----------"69 cat matlab.log70 echo "-----------End of matlab.log-----------"67 # if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then 68 # echo "----------MATLAB exited in error!----------" 69 # cat matlab.log 70 # echo "-----------End of matlab.log-----------" 71 71 72 # Clean up execution directory73 rm -rf ${ISSM_DIR}/execution/*72 # # Clean up execution directory 73 # rm -rf ${ISSM_DIR}/execution/* 74 74 75 exit 176 fi75 # exit 1 76 # fi 77 77 78 # Check that all MATLAB tests passed79 numMatlabTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`78 # # Check that all MATLAB tests passed 79 # numMatlabTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"` 80 80 81 if [[ ${numMatlabTestsFailed} -ne 0 ]]; then82 echo "One or more MATLAB tests FAILED"83 exit 1;84 else85 echo "All MATLAB tests PASSED"86 fi81 # if [[ ${numMatlabTestsFailed} -ne 0 ]]; then 82 # echo "One or more MATLAB tests FAILED" 83 # exit 1; 84 # else 85 # echo "All MATLAB tests PASSED" 86 # fi 87 87 88 # Check that Python tests run89 echo "Running Python tests"88 # # Check that Python tests run 89 # echo "Running Python tests" 90 90 91 export PATH="${PATH}:${ISSM_DIR}/bin"92 export PYTHONPATH="${ISSM_DIR}/src/m/dev"93 export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"94 export PYTHONUNBUFFERED=1 # We don't want Python to buffer output, otherwise issm.exe output is not captured91 # export PATH="${PATH}:${ISSM_DIR}/bin" 92 # export PYTHONPATH="${ISSM_DIR}/src/m/dev" 93 # export PYTHONSTARTUP="${PYTHONPATH}/devpath.py" 94 # export PYTHONUNBUFFERED=1 # We don't want Python to buffer output, otherwise issm.exe output is not captured 95 95 96 rm python.log 2> /dev/null97 ./runme.py ${PYTHON_NROPTIONS} &> python.log 2>&196 # rm python.log 2> /dev/null 97 # ./runme.py ${PYTHON_NROPTIONS} &> python.log 2>&1 98 98 99 # Check that Python did not exit in error100 pythonExitCode=`echo $?`101 pythonExitedInError=`grep -E "Error|Traceback|bad interpreter" python.log | wc -l`99 # # Check that Python did not exit in error 100 # pythonExitCode=`echo $?` 101 # pythonExitedInError=`grep -E "Error|Traceback|bad interpreter" python.log | wc -l` 102 102 103 if [[ ${pythonExitCode} -ne 0 || ${pythonExitedInError} -ne 0 ]]; then104 echo "----------Python exited in error!----------"105 cat python.log106 echo "-----------End of python.log-----------"103 # if [[ ${pythonExitCode} -ne 0 || ${pythonExitedInError} -ne 0 ]]; then 104 # echo "----------Python exited in error!----------" 105 # cat python.log 106 # echo "-----------End of python.log-----------" 107 107 108 # Clean up execution directory109 rm -rf ${ISSM_DIR}/execution/*108 # # Clean up execution directory 109 # rm -rf ${ISSM_DIR}/execution/* 110 110 111 exit 1112 fi111 # exit 1 112 # fi 113 113 114 # Check that all Python tests passed115 numPythonTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"`114 # # Check that all Python tests passed 115 # numPythonTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"` 116 116 117 if [[ ${numPythonTestsFailed} -ne 0 ]]; then 118 echo "One or more Python tests FAILED" 117 # if [[ ${numPythonTestsFailed} -ne 0 ]]; then 118 # echo "One or more Python tests FAILED" 119 # exit 1 120 # else 121 # echo "All Python tests PASSED" 122 # fi 123 124 # Create tarball 125 cd ${ISSM_DIR} 126 rm -f ${TARBALL} 127 svn cleanup --remove-ignored --remove-unversioned test # Clean up test directory (before copying to package) 128 echo "Copying assets to package: ${PACKAGE}" 129 cp -rf bin examples lib scripts test ${PACKAGE}/ 130 echo "Cleaning up unneeded/unwanted files" 131 python -m compileall ${PACKAGE}/bin # Precompile all Python scripts to bytecode 132 rm -f ${PACKAGE}/bin/*.py # Remove all Python scripts 133 rm -f ${PACKAGE}/bin/generic_static.* # Remove static versions of generic cluster classes 134 rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package 135 rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package 136 echo "Creating tarball: ${TARBALL_NAME}" 137 tar -czf ${TARBALL} ${PACKAGE} 138 ls -lah ${ISSM_DIR}/${TARBALL} 139 140 echo "Transferring binaries to ISSM Web site" 141 scp -i ~/.ssh/debian_linux-vm_to_ross ${TARBALL} jenkins@ross.ics.uci.edu:/var/www/html/${TARBALL} 142 143 if [ $? -ne 0 ]; then 144 echo "FAILED: Manually check connection" 119 145 exit 1 120 146 else 121 echo " All Python tests PASSED"147 echo "SUCCESS" 122 148 fi 123 124 # # Create tarball125 # cd ${ISSM_DIR}126 # rm -f ${TARBALL}127 # svn cleanup --remove-ignored --remove-unversioned test # Clean up test directory (before copying to package)128 # echo "Copying assets to package: ${PACKAGE}"129 # cp -rf bin examples lib scripts test ${PACKAGE}/130 # echo "Cleaning up unneeded/unwanted files"131 # python -m compileall ${PACKAGE}/bin # Precompile all Python scripts to bytecode132 # rm -f ${PACKAGE}/bin/*.py # Remove all Python scripts133 # rm -f ${PACKAGE}/bin/generic_static.* # Remove static versions of generic cluster classes134 # rm -f ${PACKAGE}/lib/*.a # Remove static libraries from package135 # rm -f ${PACKAGE}/lib/*.la # Remove libtool libraries from package136 # echo "Creating tarball: ${TARBALL_NAME}"137 # tar -czf ${TARBALL} ${PACKAGE}138 # ls -lah ${ISSM_DIR}/${TARBALL}139 140 # echo "Shipping binaries to website"141 142 # # We're using public key authentication method to upload the tarball The143 # # following lines check to see if the SSH Agent is running. If not, then it is144 # # started and relevant information is forwarded to a script.145 # pgrep "ssh-agent" > /dev/null146 # if [ $? -ne 0 ]; then147 # echo "SSH Agent is not running. Starting it..."148 # ssh-agent > ~/.ssh/agent.sh149 # else150 # echo "SSH Agent is running..."151 # fi152 153 # source ~/.ssh/agent.sh154 # ssh-add ~/.ssh/debian_linux-vm_to_ross155 156 # scp ${TARBALL} ross.ics.uci.edu:/var/www/html/${TARBALL}157 158 <<<<<<< .mine159 if [ $? -ne 0 ]; then160 echo "The upload failed."161 echo "Perhaps the SSH Agent was started by some other means."162 echo "Try killing the agent and running again."163 exit 1164 fi165 ||||||| .r24698166 if [ $? -ne 0 ]; then167 echo "The upload failed."168 echo "Perhaps the SSH Agent was started by some other means."169 echo "Try killing the agent and running again."170 fi171 =======172 # if [ $? -ne 0 ]; then173 # echo "The upload failed."174 # echo "Perhaps the SSH Agent was started by some other means."175 # echo "Try killing the agent and running again."176 # fi177 >>>>>>> .r24699
Note:
See TracChangeset
for help on using the changeset viewer.