Changeset 23732
- Timestamp:
- 02/15/19 14:01:14 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/jenkins/jenkins.sh
r23375 r23732 1 1 #!/bin/bash 2 #This bash script calls the nightlyrun.m matlab file to run our nightly test decks. 2 #This bash script calls the nightlyrun.m matlab file to run our nightly test decks. 3 3 #It then processes the results and sends an email to the Ice developpers. 4 4 … … 24 24 echo "File $1 not found!" >&2 # Error message to stderr. 25 25 exit 1 26 fi 26 fi 27 27 28 28 #Defaults (to avoid -eq: unary operator expected) … … 37 37 #Get Operating system (OS) name{{{ 38 38 OS=$(uname -s) 39 if [[ $OS == CYGWIN* ]]; then 39 if [[ $OS == CYGWIN* ]]; then 40 40 OS="win"; 41 41 fi … … 121 121 #Install external packages (ISSM_EXTERNALPACKAGES){{{ 122 122 123 #number of packages: 123 #number of packages: 124 124 NUMPACKAGES=$(($(echo $EXTERNALPACKAGES | wc -w )/2)) 125 125 … … 190 190 fi 191 191 192 # Source here to include any newly installed externalpackages on the path. 192 # Source here to include any newly installed externalpackages on the path. 193 193 source $ISSM_DIR/etc/environment.sh 194 194 … … 220 220 make distclean 221 221 ./scripts/automakererun.sh 222 if [ $? -ne 0 ]; then 222 if [ $? -ne 0 ]; then 223 223 echo "autoreconf failed!" 224 224 exit 1 225 225 fi 226 226 eval "./configure $ISSM_CONFIG" 227 if [ $? -ne 0 ]; then 227 if [ $? -ne 0 ]; then 228 228 echo "ISSM configuration failed (see options below)" 229 229 echo $ISSM_CONFIG … … 243 243 make 244 244 fi 245 if [ $? -ne 0 ] && [ $NUMCPUS_INSTALL -gt 1 ]; then 245 if [ $? -ne 0 ] && [ $NUMCPUS_INSTALL -gt 1 ]; then 246 246 echo " " 247 247 echo "Compilation failed, trying to compile with only one thread" … … 249 249 make 250 250 fi 251 if [ $? -ne 0 ]; then 251 if [ $? -ne 0 ]; then 252 252 echo "ISSM_COMPILATION failed!" 253 253 exit 1 … … 263 263 #}}} 264 264 265 #Restore CXX/CC to their previous values 265 #Restore CXX/CC to their previous values 266 266 export CXX=$CXX_PREVIOUS 267 267 export CC=$CC_PREVIOUS … … 344 344 done 345 345 346 #filter out windows characters: 346 #filter out windows characters: 347 347 cat matlab_log.log | tr -cd '\11\12\40-\176' > matlab_log.log2 && mv matlab_log.log2 matlab_log.log 348 348 fi … … 353 353 if [ $PYTHON_TEST -eq 1 ]; then 354 354 #Launch all tests on different cpus 355 #export PYTHONPATH="$ISSM_DIR/src/m/dev" 355 356 export PYTHONSTARTUP=$ISSM_DIR/src/m/dev/devpath.py 356 357 export PYTHONUNBUFFERED=1 #we don't want python to buffer otherwise issm.exe output is not captured … … 380 381 cat python_log$i.log >> python_log.log 381 382 done 383 fi 384 385 # Check that Python did not exit in error 386 exitedInError=`grep "Traceback" python_log.log | wc -l` 387 388 if [ $exitedInError -ne 0 ] 389 then 390 echo "Python error!" 391 cat python_log.log 392 echo "FAILURE" 393 exit 1 382 394 fi 383 395 # }}} … … 413 425 $SED -i.bak 's/steps=\[1\];/steps=\[1:8\];\n\ntry\n/' $FILE 414 426 $SED -i.bak "s/if any(steps==8)/&${STEP_EIGHT}/" $FILE 415 elif [ "${dir}" == "./IceBridge" ]; 427 elif [ "${dir}" == "./IceBridge" ]; 416 428 then 417 429 $SED -i.bak 's/steps=\[1\];/steps=\[1:5\];\n\ntry\n/' $FILE 418 elif [ "${dir}" == "./IceflowModels" ]; 430 elif [ "${dir}" == "./IceflowModels" ]; 419 431 then 420 432 # Almost nothing to this example 421 433 $SED -i.bak '1 s/^.*$/try\n\n&/' $FILE 422 elif [ "${dir}" == "./ISMIP" ]; 434 elif [ "${dir}" == "./ISMIP" ]; 423 435 then 424 436 # Eight steps... none of which are implmented in the script... 425 437 $SED -i.bak '1 s/^.*$/try\n\n&/' $FILE 426 elif [ "${dir}" == "./Inversion" ]; 438 elif [ "${dir}" == "./Inversion" ]; 427 439 then 428 440 $SED -i.bak 's/steps=\[1\];/steps=\[1:4\];\n\ntry\n/' $FILE 429 elif [ "${dir}" == "./Jakobshavn" ]; 441 elif [ "${dir}" == "./Jakobshavn" ]; 430 442 then 431 443 $SED -i.bak 's/steps=\[1\];/steps=\[1:4\];\n\ntry\n/' $FILE 432 elif [ "${dir}" == "./Jakobshavn" ]; 444 elif [ "${dir}" == "./Jakobshavn" ]; 433 445 then 434 446 $SED -i.bak 's/steps=\[1\];/steps=\[1:4\];\n\ntry\n/' $FILE 435 elif [ "${dir}" == "./Pig" ]; 447 elif [ "${dir}" == "./Pig" ]; 436 448 then 437 449 # Step 6 is needed … … 439 451 $SED -i.bak 's/steps=\[1\];/steps=\[1:7\];\n!mv DomainOutline.bkp DomainOutline.exp;\n\ntry\n/' $FILE 440 452 $SED -i.bak "s/if any(steps==6)/&${STEP_SIX}/" $FILE 441 elif [ "${dir}" == "./PigSensitivity" ]; 453 elif [ "${dir}" == "./PigSensitivity" ]; 442 454 then 443 455 # Step 4 is needed … … 445 457 $SED -i.bak 's/steps=\[1\];/steps=\[1:4\];\n\ntry\n/' $FILE 446 458 $SED -i.bak "s/if any(steps==6)/&${STEP_FOUR}/" $FILE 447 elif [ "${dir}" == "./SquareIceShelf" ]; 459 elif [ "${dir}" == "./SquareIceShelf" ]; 448 460 then 449 461 # Almost nothing to this example 450 462 $SED -i.bak '1 s/^.*$/try\n\n&/' $FILE 451 elif [ "${dir}" == "./UncertaintyQuantification" ]; 463 elif [ "${dir}" == "./UncertaintyQuantification" ]; 452 464 then 453 465 $SED -i.bak 's/steps=\[1\];/steps=\[1:7\];\n\ntry\n/' $FILE 454 elif [ "${dir}" == "./Data" ]; 466 elif [ "${dir}" == "./Data" ]; 455 467 then 456 468 echo "Data directory is used by examples. No modifications required."
Note:
See TracChangeset
for help on using the changeset viewer.