Index: /issm/trunk-jpl/jenkins/jenkins.sh
===================================================================
--- /issm/trunk-jpl/jenkins/jenkins.sh	(revision 25963)
+++ /issm/trunk-jpl/jenkins/jenkins.sh	(revision 25964)
@@ -485,7 +485,4 @@
 		exit 1
 	fi
-
-	# Python tests must have run and exited successfully (unless we have missed something)
-	echo "PYTHONEXITEDCORRECTLY"
 fi
 
@@ -501,4 +498,18 @@
 		juLog -test=Example-$i -name=Failure -error=FAILURE awk "/starting: $i/{flag=1;next}/finished: $i/{flag=0} flag{print}" matlab_log_examples.log
 	done
+
+	# Check that MATLAB did not exit in error
+	matlabExitedInError=`grep -E "Activation cannot proceed|Error in matlab_run|Illegal use of reserved keyword" matlab_log_examples.log | wc -l`
+
+	if [ $matlabExitedInError -ne 0 ]; then
+		echo "----------MATLAB exited in error!----------"
+		cat matlab_log_examples.log
+		echo "-----------End of matlab_log.log-----------"
+
+		# Clean up execution directory
+		rm -rf $ISSM_DIR/execution/*
+
+		exit 1
+	fi
 fi
 
