[CalendarServer-changes] [13682] CalendarServer/trunk/bin/test

source_changes at macosforge.org source_changes at macosforge.org
Tue Jun 24 19:24:15 PDT 2014


Revision: 13682
          http://trac.calendarserver.org//changeset/13682
Author:   sagen at apple.com
Date:     2014-06-24 19:24:15 -0700 (Tue, 24 Jun 2014)
Log Message:
-----------
If no args are passed, use a single invocation of trial rather than a loop

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

Modified: CalendarServer/trunk/bin/test
===================================================================
--- CalendarServer/trunk/bin/test	2014-06-24 17:43:22 UTC (rev 13681)
+++ CalendarServer/trunk/bin/test	2014-06-25 02:24:15 UTC (rev 13682)
@@ -83,15 +83,7 @@
 done;
 shift $((${OPTIND} - 1));
 
-if [ $# -eq 0 ]; then
-  lint="true";
-  set - calendarserver twistedcaldav txdav txweb2 contrib twext;
-else
-  lint="false";
-fi;
 
-
-
 #
 # Dependencies
 #
@@ -112,11 +104,10 @@
 # Unit tests
 #
 
-for module in "$@"; do
-  if [ -f "${module}" ]; then
-    module="--testmodule=${module}";
-  fi;
-
+if [ $# -eq 0 ]; then
+  lint="true";
+  # Test these modules with a single invocation of trial
+  set - calendarserver twistedcaldav txdav txweb2 contrib
   cd "${wd}" &&                                       \
     "${wd}/bin/trial"                                 \
     --temp-directory="${dev_home}/trial"              \
@@ -127,10 +118,30 @@
     ${no_color}                                       \
     ${coverage}                                       \
     ${numjobs}                                        \
-    "${module}";
-done;
+    "$@";
+else
+  lint="false";
+  # Loop over the passed-in modules
+  for module in "$@"; do
+    if [ -f "${module}" ]; then
+      module="--testmodule=${module}";
+    fi;
+    cd "${wd}" &&                                       \
+      "${wd}/bin/trial"                                 \
+      --temp-directory="${dev_home}/trial"              \
+      --rterrors                                        \
+      ${reactor}                                        \
+      ${random}                                         \
+      ${until_fail}                                     \
+      ${no_color}                                       \
+      ${coverage}                                       \
+      ${numjobs}                                        \
+      "${module}";
+  done;
+fi;
 
 
+
 if ! "${lint}"; then
   exit 0;
 fi;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20140624/5b88f14d/attachment.html>


More information about the calendarserver-changes mailing list