Log message for revision 41046:
  
  - Report number of failures/errors
  

Changed:
  U   Zope/branches/Zope-2_8-branch/test.py

-=-
Modified: Zope/branches/Zope-2_8-branch/test.py
===================================================================
--- Zope/branches/Zope-2_8-branch/test.py       2005-12-27 18:34:58 UTC (rev 
41045)
+++ Zope/branches/Zope-2_8-branch/test.py       2005-12-28 02:52:06 UTC (rev 
41046)
@@ -609,6 +609,8 @@
 def runner(files, test_filter, debug):
     runner = ImmediateTestRunner(verbosity=VERBOSE, debug=debug,
                                  progress=progress)
+    result = runner.result
+    
     suite = unittest.TestSuite()
     for file in files:
         s = get_suite(file, runner.result)
@@ -625,6 +627,8 @@
                 print "Wrote timing data to", timesfn
         if timetests:
             r.print_times(sys.stdout, timetests)
+        numbad = len(result.failures) + len(result.errors)
+        return numbad
     except:
         if debugger:
             pdb.post_mortem(sys.exc_info()[2])
@@ -706,7 +710,7 @@
             rc = sys.gettotalrefcount()
             track = TrackRefs()
         while True:
-            runner(files, test_filter, debug)
+            numbad = runner(files, test_filter, debug)
             gc.collect()
             if gc.garbage:
                 print "GARBAGE:", len(gc.garbage), gc.garbage
@@ -717,8 +721,9 @@
                 print "totalrefcount=%-8d change=%-6d" % (rc, rc - prev)
                 track.update()
     else:
-        runner(files, test_filter, debug)
+        numbad = runner(files, test_filter, debug)
 
+    return numbad
 
 def configure_logging():
     """Initialize the logging module."""

_______________________________________________
Zope-Checkins maillist  -  Zope-Checkins@zope.org
http://mail.zope.org/mailman/listinfo/zope-checkins

Reply via email to