diff --git a/py/test/dsession/dsession.py b/py/test/dsession/dsession.py index 225233637..c78d36777 100644 --- a/py/test/dsession/dsession.py +++ b/py/test/dsession/dsession.py @@ -9,7 +9,7 @@ from py.__.test import event from py.__.test.runner import basic_run_report, basic_collect_report from py.__.test.session import Session from py.__.test import outcome -from py.__.test.dsession.nodemanage import NodeManager +from py.__.test.dsession.nodemanage import NodeManager, getxspecs import Queue @@ -81,12 +81,9 @@ class DSession(Session): raise ValueError, "--exec together with --pdb not supported." if option.executable and not option.dist and not option.numprocesses: option.numprocesses = 1 - config = self.config - if config.option.numprocesses: - return try: - config.getvalue('xspecs') - except KeyError: + getxspecs(self.config) + except self.config.Error: print "Please specify test environments for distribution of tests:" print "py.test --tx ssh=user@somehost --tx popen//python=python2.5" print "conftest.py: pytest_option_tx=['ssh=user@somehost','popen']" diff --git a/py/test/dsession/nodemanage.py b/py/test/dsession/nodemanage.py index 37eb679dc..ad583e056 100644 --- a/py/test/dsession/nodemanage.py +++ b/py/test/dsession/nodemanage.py @@ -59,7 +59,6 @@ class NodeManager(object): self.gwmanager.rsync(self.config.topdir, **options) # and cd into it self.gwmanager.multi_chdir(self.config.topdir.basename, inplacelocal=False) - self.config.bus.notify("rsyncfinished") def trace(self, msg): self.config.bus.notify("trace", "nodemanage", msg) @@ -100,7 +99,8 @@ def getxspecs(config): xspecs = config.option.xspecs if not xspecs: xspecs = config.getvalue("xspecs") - assert xspecs is not None + if xspecs is None: + raise config.Error("MISSING test execution (tx) nodes: please specify --tx") #print "option value for xspecs", xspecs return [py.execnet.XSpec(x) for x in xspecs] diff --git a/py/test/dsession/testing/test_nodemanage.py b/py/test/dsession/testing/test_nodemanage.py index 89f7a00a4..cb4fd0e24 100644 --- a/py/test/dsession/testing/test_nodemanage.py +++ b/py/test/dsession/testing/test_nodemanage.py @@ -46,6 +46,7 @@ class TestNodeManager: assert dest.join("dir1").check() assert dest.join("dir1", "dir2").check() assert dest.join("dir1", "dir2", 'hello').check() + nodemanager.gwmanager.exit() def test_init_rsync_roots(self, source, dest): dir2 = source.ensure("dir1", "dir2", dir=1) diff --git a/py/test/plugin/pytest_terminal.py b/py/test/plugin/pytest_terminal.py index 635bed0f2..be14cc010 100644 --- a/py/test/plugin/pytest_terminal.py +++ b/py/test/plugin/pytest_terminal.py @@ -89,7 +89,10 @@ class TerminalReporter: def pyevent_gwmanage_rsyncstart(self, source, gateways): targets = ", ".join([gw.id for gw in gateways]) - self.write_line("rsyncstart: %s -> %s" %(source, targets)) + msg = "rsyncstart: %s -> %s" %(source, targets) + if not self.config.option.verbose: + msg += " # use --verbose to see rsync progress" + self.write_line(msg) def pyevent_gwmanage_rsyncfinish(self, source, gateways): targets = ", ".join([gw.id for gw in gateways])