diff --git a/py/test/dsession/nodemanage.py b/py/test/dsession/nodemanage.py index 6ac202e73..37eb679dc 100644 --- a/py/test/dsession/nodemanage.py +++ b/py/test/dsession/nodemanage.py @@ -4,41 +4,6 @@ from py.__.test.dsession.masterslave import MasterNode from py.__.execnet.gwmanage import GatewayManager from py.__.test import event -def getxspecs(config): - if config.option.numprocesses: - if config.option.executable: - s = 'popen//python=%s' % config.option.executable - else: - s = 'popen' - xspecs = [s] * config.option.numprocesses - else: - xspecs = config.option.xspecs - if not xspecs: - xspecs = config.getvalue("xspecs") - assert xspecs is not None - #print "option value for xspecs", xspecs - return [py.execnet.XSpec(x) for x in xspecs] - -def getconfigroots(config): - roots = config.option.rsyncdirs - if roots: - roots = [py.path.local(x) for x in roots.split(',')] - else: - roots = [] - conftestroots = config.getconftest_pathlist("rsyncdirs") - if conftestroots: - roots.extend(conftestroots) - pydir = py.path.local(py.__file__).dirpath() - for root in roots: - if not root.check(): - raise ValueError("rsyncdir doesn't exist: %r" %(root,)) - if pydir is not None and root.basename == "py": - if root != pydir: - raise ValueError("root %r conflicts with current %r" %(root, pydir)) - pydir = None - if pydir is not None: - roots.append(pydir) - return roots class NodeManager(object): def __init__(self, config, specs=None): @@ -94,7 +59,7 @@ 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", event.RsyncFinished()) + self.config.bus.notify("rsyncfinished") def trace(self, msg): self.config.bus.notify("trace", "nodemanage", msg) @@ -123,3 +88,39 @@ class NodeManager(object): def teardown_nodes(self): # XXX teardown nodes? self.gwmanager.exit() + +def getxspecs(config): + if config.option.numprocesses: + if config.option.executable: + s = 'popen//python=%s' % config.option.executable + else: + s = 'popen' + xspecs = [s] * config.option.numprocesses + else: + xspecs = config.option.xspecs + if not xspecs: + xspecs = config.getvalue("xspecs") + assert xspecs is not None + #print "option value for xspecs", xspecs + return [py.execnet.XSpec(x) for x in xspecs] + +def getconfigroots(config): + roots = config.option.rsyncdirs + if roots: + roots = [py.path.local(x) for x in roots.split(',')] + else: + roots = [] + conftestroots = config.getconftest_pathlist("rsyncdirs") + if conftestroots: + roots.extend(conftestroots) + pydir = py.path.local(py.__file__).dirpath() + for root in roots: + if not root.check(): + raise ValueError("rsyncdir doesn't exist: %r" %(root,)) + if pydir is not None and root.basename == "py": + if root != pydir: + raise ValueError("root %r conflicts with current %r" %(root, pydir)) + pydir = None + if pydir is not None: + roots.append(pydir) + return roots diff --git a/py/test/dsession/testing/test_functional_dsession.py b/py/test/dsession/testing/test_functional_dsession.py index cef5df1d4..e09d96a5b 100644 --- a/py/test/dsession/testing/test_functional_dsession.py +++ b/py/test/dsession/testing/test_functional_dsession.py @@ -89,6 +89,6 @@ class TestAsyncFunctional: assert os.nice(0) == 10 """) evrec = testdir.inline_run('-d', p1, '--tx=popen') - ev = evrec.getreport('test_nice') + ev = evrec.getfirstnamed('itemtestreport') assert ev.passed diff --git a/py/test/event.py b/py/test/event.py index 72b5f40aa..9e446c3a9 100644 --- a/py/test/event.py +++ b/py/test/event.py @@ -157,16 +157,11 @@ class HostRSyncing(BaseEvent): self.remotepath = remotepath self.synced = synced -class RsyncFinished(BaseEvent): - def __init__(self): - self.time = timestamp() - class HostRSyncRootReady(BaseEvent): def __init__(self, host, root): self.host = host self.root = root - # make all eventclasses available on BaseEvent so that # consumers of events can easily filter by # 'isinstance(event, event.Name)' checks diff --git a/py/test/plugin/pytest_terminal.py b/py/test/plugin/pytest_terminal.py index 55171f665..635bed0f2 100644 --- a/py/test/plugin/pytest_terminal.py +++ b/py/test/plugin/pytest_terminal.py @@ -258,11 +258,6 @@ class TerminalReporter: else: excrepr.reprcrash.toterminal(self._tw) - def out_hostinfo(self): - self._tw.line("host 0: %s %s - Python %s" % - (py.std.sys.platform, - py.std.sys.executable, - repr_pythonversion())) class CollectonlyReporter: INDENT = " " diff --git a/py/test/testing/test_config.py b/py/test/testing/test_config.py index 11f909e05..d5053e414 100644 --- a/py/test/testing/test_config.py +++ b/py/test/testing/test_config.py @@ -240,7 +240,6 @@ class TestConfigApi_getcolitems: class TestOptionEffects: def test_boxed_option_default(self, testdir): - testdir.makepyfile(conftest="dist_hosts=[]") tmpdir = testdir.tmpdir.ensure("subdir", dir=1) config = py.test.config._reparse([tmpdir]) config.initsession() @@ -254,10 +253,8 @@ class TestOptionEffects: assert not config.option.boxed def test_boxed_option_from_conftest(self, testdir): - testdir.makepyfile(conftest="dist_hosts=[]") tmpdir = testdir.tmpdir.ensure("subdir", dir=1) tmpdir.join("conftest.py").write(py.code.Source(""" - dist_hosts = [] dist_boxed = True """)) config = py.test.config._reparse(['--dist', tmpdir])