[py-svn] r31588 - py/branch/distributed/py/test/rsession
hpk at codespeak.net
hpk at codespeak.net
Thu Aug 24 12:20:07 CEST 2006
Author: hpk
Date: Thu Aug 24 12:20:05 2006
New Revision: 31588
Modified:
py/branch/distributed/py/test/rsession/rsession.py
Log:
(fijal, hpk) make the RSession basically work
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 24 12:20:05 2006
@@ -23,15 +23,21 @@
def main(self, args):
""" main loop for running tests. """
- colitems = self._map2colitems(args)
+ if not args:
+ args = [py.path.local()]
+ pkgdir = self.getpkgdir(args[0])
+ colitems = self.make_colitems(args, baseon=pkgdir.dirpath())
+
sshhosts = self.config.getinitialvalue("disthosts")
- relpath = "pytestcache"
- pkgdir = getrootdir(args)
- nodes = init_hosts(self.report, sshhosts, relpath, pkgdir)
+ destrelpath = "pytestcache"
+ nodes = init_hosts(self.report, sshhosts, destrelpath, pkgdir)
- # XXX: We're just ignoring errors from the tryiter, so skipped tests
- # does not appear in output
- itemgenerator = colitems[0].tryiter()
+ def itemgen():
+ for x in colitems:
+ for y in x.tryiter():
+ yield y
+
+ itemgenerator = itemgen()
#assert 0, "\n".join([",".join(x.listnames()) for x in list(itemgenerator)])
dispatch_loop(nodes, itemgenerator, lambda : False)
teardown_hosts(self.report, [node.channel for node in nodes])
@@ -41,6 +47,7 @@
# the target paths by joining the basenames
res = []
for x in paths:
+ x = py.path.local(x)
current = py.test.collect.Directory(baseon)
relparts = x.relto(baseon).split(x.sep)
assert relparts
More information about the pytest-commit
mailing list