[Zope3-checkins] SVN: zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/ checkpoint

Benji York benji at zope.com
Thu Jul 3 00:01:50 EDT 2008


Log message for revision 87944:
  checkpoint
  

Changed:
  U   zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/layer.py
  U   zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/runner.py

-=-
Modified: zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/layer.py
===================================================================
--- zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/layer.py	2008-07-03 00:38:39 UTC (rev 87943)
+++ zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/layer.py	2008-07-03 04:01:49 UTC (rev 87944)
@@ -19,3 +19,7 @@
 
 class UnitTests(object):
     """A layer for gathering all unit tests."""
+
+    @staticmethod
+    def tearDown():
+        raise NotImplementedError

Modified: zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/runner.py
===================================================================
--- zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/runner.py	2008-07-03 00:38:39 UTC (rev 87943)
+++ zope.testing/branches/benji-parallelize-subprocesses/src/zope/testing/testrunner/runner.py	2008-07-03 04:01:49 UTC (rev 87944)
@@ -438,8 +438,10 @@
             thread.start()
             running_threads.append(thread)
 
-        running_threads[0].join()
-        del running_threads[0]
+        for index, thread in list(enumerate(running_threads)):
+            if not thread.isAlive():
+                del running_threads[index]
+        time.sleep(0.1)
 
     # Gather up all the results.
     rantotal = 0
@@ -626,11 +628,17 @@
     gathered.reverse()
     seen = {}
     result = []
+
     for layer in gathered:
         if layer not in seen:
             seen[layer] = 1
             if layer in layers:
-                result.append(layer)
+                if (name_from_layer(layer) ==
+                    'zope.testing.testrunner.layer.UnitTests'):
+                    result.insert(0, layer)
+                else:
+                    result.append(layer)
+
     return result
 
 



More information about the Zope3-Checkins mailing list