Index: issm/trunk-jpl/packagers/mac/test-issm-mac-binaries-python.sh
===================================================================
--- issm/trunk-jpl/packagers/mac/test-issm-mac-binaries-matlab.sh	(revision 25744)
+++ issm/trunk-jpl/packagers/mac/test-issm-mac-binaries-python.sh	(revision 25780)
@@ -1,14 +1,16 @@
 #!/bin/bash
 
-# This script is intended to test ISSM macOS MATLAB binaries downloaded to a 
-# user-end machine.
+################################################################################
+# This script is intended to test ISSM macOS MATLAB binaries on an end-user 
+# machine after successful packaging and signing.
 #
 # NOTE: Tarball must already exist in INSTALL_DIR
+################################################################################
+
+## Constants
 #
-
-INSTALL_DIR=~/Downloads
-MATLAB_NROPTIONS="'benchmark','all','exclude',[125,126,234,235,418,420,435,444,445,701,702,703,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1201,1202,1203,1204,1205,1206,1207,1208,1301,1302,1303,1304,1401,1402,1601,1602,2006,2020,2021,2051,2052,2053,3001:3200,3201,3202,3300,3480,3481,4001,4002,4003]" # NOTE: Combination of test suites from basic, Dakota, and Solid Earth builds, with tests that require a restart and those that require the JVM excluded
-MATLAB_PATH="/Applications/MATLAB_R2018a.app"
-PKG="ISSM-macOS-MATLAB"
+INSTALL_DIR=.
+PKG="ISSM-macOS-Python"
+PYTHON_NROPTIONS="--benchmark all --exclude 125 126 234 235 418 420 435 444 445 701 702 703 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1201 1202 1203 1204 1205 1206 1207 1208 1301 1302 1303 1304 1401 1402 1601 1602 2006 2020 2021 2051 2052 2053 3001:3200 3201 3202 3300 3480 3481 4001 4002 4003" # NOTE: Combination of test suites from basic, Dakota, and Solid Earth builds, with tests that require a restart and those that require the JVM excluded
 
 COMPRESSED_PKG="${PKG}.zip"
@@ -16,36 +18,36 @@
 export ISSM_DIR="${INSTALL_DIR}/${PKG}"
 export PATH="${PATH}:${ISSM_DIR}/bin:${ISSM_DIR}/scripts"
+export PYTHONPATH="${ISSM_DIR}/scripts"
+export PYTHONSTARTUP="${PYTHONPATH}/devpath.py"
+export PYTHONUNBUFFERED=1 # We don't want Python to buffer output, otherwise issm.exe output is not captured
 
 cd ${INSTALL_DIR}
 rm -rf ${PKG}
-tar -zxvf ${COMPRESSED_PKG}
+ditto -xk ${COMPRESSED_PKG} .
 cd ${PKG}/test/NightlyRun
 
-# Check that MATLAB tests run
-echo "Running MATLAB tests"
-rm matlab.log 2> /dev/null
+# Run tests, redirecting output to logfile and suppressing output to console
+echo "Running tests"
+rm python.log 2> /dev/null
+./runme.py ${PYTHON_NROPTIONS} &> python.log 2>&1
 
-# Run MATLAB tests redirecting output to logfile and suppressing output to console
-${MATLAB_PATH}/bin/matlab -nosplash -nodesktop -nojvm -r "try, addpath ../../bin; addpath ../../lib; runme(${MATLAB_NROPTIONS}); exit; catch me,fprintf('%s',getReport(me)); exit; end" -logfile matlab.log &> /dev/null
+# Check that Python did not exit in error
+pythonExitCode=`echo $?`
+pythonExitedInError=`grep -E "runme.py: error" python.log | wc -l`
 
-# Check that MATLAB did not exit in error
-matlabExitCode=`echo $?`
-matlabExitedInError=`grep -E "Activation cannot proceed|license|Error|Warning: Name is nonexistent or not a directory" matlab.log | wc -l`
-
-if [[ ${matlabExitCode} -ne 0 || ${matlabExitedInError} -ne 0 ]]; then
-	echo "----------MATLAB exited in error!----------"
-	cat matlab.log
-	echo
-	echo "-----------End of matlab.log-----------"
+if [[ ${pythonExitCode} -ne 0 || ${pythonExitedInError} -ne 0 ]]; then
+	echo "----------Python exited in error!----------"
+	cat python.log
+	echo "-----------End of python.log-----------"
 	exit 1
 fi
 
-# Check that all MATLAB tests passed
-numMatlabTestsFailed=`cat matlab.log | grep -c -e "FAILED|ERROR"`
+# Check that all tests passed
+numTestsFailed=`cat python.log | grep -c -e "FAILED|ERROR"`
 
-if [[ ${numMatlabTestsFailed} -ne 0 ]]; then
-	echo "One or more MATLAB tests FAILED"
+if [[ ${numTestsFailed} -ne 0 ]]; then
+	echo "One or more tests FAILED"
 	exit 1
 else
-	echo "All MATLAB tests PASSED"
+	echo "All tests PASSED"
 fi
