[py-svn] r36238 - py/dist/py/test/rsession

fijal at codespeak.net fijal at codespeak.net
Mon Jan 8 11:38:33 CET 2007


Author: fijal
Date: Mon Jan  8 11:38:32 2007
New Revision: 36238

Modified:
   py/dist/py/test/rsession/rsession.py
Log:
Another round of cleanups


Modified: py/dist/py/test/rsession/rsession.py
==============================================================================
--- py/dist/py/test/rsession/rsession.py	(original)
+++ py/dist/py/test/rsession/rsession.py	Mon Jan  8 11:38:32 2007
@@ -178,24 +178,15 @@
         """ main loop for running tests. """
         if not args: 
             args = [py.path.local()]
-        sshhosts = self.config.getinitialvalue("disthosts")
-        directories = parse_directories(sshhosts)
-        try:
-            rsync_roots = self.config.getinitialvalue("distrsync_roots")
-        except:
-            rsync_roots = None    # all files and directories in the pkgdir
         
         session_options.bind_config(self.config)
+        sshhosts, directories, remotepython, rsync_roots = self.read_distributed_config()
         reporter, checkfun, startserverflag = self.init_reporter(reporter,
             sshhosts, RemoteReporter)
         if override_checkfun:
             checkfun = override_checkfun
 
         reporter(report.TestStarted(sshhosts))
-        try:
-            remotepython = self.config.getinitialvalue("dist_remotepython")
-        except:
-            remotepython = None
 
         pkgdir = self.getpkgdir(args[0])
         done_dict = {}
@@ -213,6 +204,19 @@
         reporter(report.Nodes(nodes))
         return reporter(report.TestFinished())
 
+    def read_distributed_config(self):
+        try:
+            rsync_roots = self.config.getinitialvalue("distrsync_roots")
+        except:
+            rsync_roots = None    # all files and directories in the pkgdir
+        sshhosts = self.config.getinitialvalue("disthosts")
+        directories = parse_directories(sshhosts)
+        try:
+            remotepython = self.config.getinitialvalue("dist_remotepython")
+        except:
+            remotepython = None
+        return sshhosts, directories, remotepython, rsync_roots
+
     def dispatch_tests(self, nodes, args, pkgdir, reporter, checkfun, done_dict):
         colitems = self.make_colitems(args, baseon=pkgdir.dirpath())
         keyword = self.config.option.keyword


More information about the py-svn mailing list