[CalendarServer-changes] [13996] CalendarServer/trunk/bin/testserver

source_changes at macosforge.org source_changes at macosforge.org
Mon Sep 22 14:46:13 PDT 2014


Revision: 13996
          http://trac.calendarserver.org//changeset/13996
Author:   dre at apple.com
Date:     2014-09-22 14:46:13 -0700 (Mon, 22 Sep 2014)
Log Message:
-----------
testserver's exit status should reflect testcaldav.py's result

Modified Paths:
--------------
    CalendarServer/trunk/bin/testserver

Modified: CalendarServer/trunk/bin/testserver
===================================================================
--- CalendarServer/trunk/bin/testserver	2014-09-22 21:01:05 UTC (rev 13995)
+++ CalendarServer/trunk/bin/testserver	2014-09-22 21:46:13 UTC (rev 13996)
@@ -123,7 +123,8 @@
 
 echo "Server has started"
 
-# Don't exit if testcaldav.py fails
+# Don't exit if testcaldav.py fails, because we need to clean up afterwards.
+
 set +e
 
 # Run CDT
@@ -132,5 +133,17 @@
 
 cd "${cdt}" && "${python}" testcaldav.py ${random} ${seed} ${ssl} --print-details-onfail ${printres} -s "${serverinfo}" ${subdir} "$@";
 
+# Capture exit status of testcaldav.py to use as this script's exit status.
+
+STATUS=$?
+
+# Re-enable exit on failure incase run -nk fails
+
+set -e
+
 echo "Stopping server"
 "${wd}/bin/run" -nk -c "${configdir}/caldavd-cdt.plist"
+
+# Exit with the exit status of testcaldav.py, to reflect the test suite's result
+
+exit $STATUS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140922/751561b5/attachment.html>


More information about the calendarserver-changes mailing list