[py-svn] r31881 - py/branch/distributed/py/test/rsession

fijal at codespeak.net fijal at codespeak.net
Thu Aug 31 15:30:56 CEST 2006


Author: fijal
Date: Thu Aug 31 15:30:54 2006
New Revision: 31881

Modified:
   py/branch/distributed/py/test/rsession/master.py
   py/branch/distributed/py/test/rsession/report.py
   py/branch/distributed/py/test/rsession/rsession.py
Log:
Added rsync info + extended default queue length.


Modified: py/branch/distributed/py/test/rsession/master.py
==============================================================================
--- py/branch/distributed/py/test/rsession/master.py	(original)
+++ py/branch/distributed/py/test/rsession/master.py	Thu Aug 31 15:30:54 2006
@@ -5,7 +5,7 @@
 from py.__.test.rsession.outcome import ReprOutcome
 from py.__.test.rsession import report
 
-MAX_TASKS_PER_NODE = 5
+MAX_TASKS_PER_NODE = 15
 
 class MasterNode(object):
     def __init__(self, channel, reporter):

Modified: py/branch/distributed/py/test/rsession/report.py
==============================================================================
--- py/branch/distributed/py/test/rsession/report.py	(original)
+++ py/branch/distributed/py/test/rsession/report.py	Thu Aug 31 15:30:54 2006
@@ -102,3 +102,7 @@
     """
     def __init__(self, item):
         self.item = item
+
+class RsyncFinished(ReportEvent):
+    def __init__(self):
+        self.time = time.time()

Modified: py/branch/distributed/py/test/rsession/rsession.py
==============================================================================
--- py/branch/distributed/py/test/rsession/rsession.py	(original)
+++ py/branch/distributed/py/test/rsession/rsession.py	Thu Aug 31 15:30:54 2006
@@ -57,6 +57,9 @@
         txt = " Test started, hosts: %s " % ", ".join(item.hosts)
         self.out.sep("=", txt)
         self.timestart = item.timestart
+
+    def report_RsyncFinished(self, item):
+        self.timersync = item.time
     
     def report_TestFinished(self, item):
         assert hasattr(self, 'timestart')
@@ -160,8 +163,9 @@
         total = total_passed + total_failed + total_skipped
         skipped_str = create_str("skipped", total_skipped)
         failed_str = create_str("failed", total_failed)
-        self.out.sep("=", " %d test run%s%s in %.2fs " % 
-            (total, skipped_str, failed_str, self.timeend - self.timestart))
+        self.out.sep("=", " %d test run%s%s in %.2fs (rsync: %.2f)" % 
+            (total, skipped_str, failed_str, self.timeend - self.timestart,
+             self.timersync - self.timestart))
     
     def report_SkippedTryiter(self, event):
         #event.outcome.excinfo.source = 
@@ -237,6 +241,7 @@
 
         nodes = init_hosts(reporter, sshhosts, directories, pkgdir,
             rsync_files)
+        reporter(report.RsyncFinished())
         
         def reporterror(data):
             excinfo, item = data



More information about the pytest-commit mailing list