diff --git a/py/test/rsession/hostmanage.py b/py/test/rsession/hostmanage.py index 8dc2dfddd..13cc2944c 100644 --- a/py/test/rsession/hostmanage.py +++ b/py/test/rsession/hostmanage.py @@ -127,12 +127,8 @@ class HostManager(object): finishedcallback=donecallback) rsync.send(root) - def init_hosts(self, reporter): - # hosts ready + def setup_hosts(self, reporter): self.init_rsync(reporter) - return self.setup_nodes(reporter) - - def setup_nodes(self, reporter): nodes = [] for host in self.hosts: if hasattr(host.gw, 'remote_exec'): # otherwise dummy for tests :/ diff --git a/py/test/rsession/rsession.py b/py/test/rsession/rsession.py index c72819985..2d901d107 100644 --- a/py/test/rsession/rsession.py +++ b/py/test/rsession/rsession.py @@ -133,21 +133,21 @@ class RSession(AbstractSession): reporter(repevent.TestStarted(hm.hosts)) try: - nodes = hm.init_hosts(reporter) + nodes = hm.setup_hosts(reporter) reporter(repevent.RsyncFinished()) try: self.dispatch_tests(nodes, reporter, checkfun) except (KeyboardInterrupt, SystemExit): print >>sys.stderr, "C-c pressed waiting for gateways to teardown..." channels = [node.channel for node in nodes] - hostmanager.kill_channels(channels) - hostmanager.teardown_gateways(reporter, channels) + hm.kill_channels(channels) + hm.teardown_gateways(reporter, channels) print >>sys.stderr, "... Done" raise channels = [node.channel for node in nodes] - hostmanager.teardown_hosts(reporter, channels, nodes, - exitfirst=self.config.option.exitfirst) + hm.teardown_hosts(reporter, channels, nodes, + exitfirst=self.config.option.exitfirst) reporter(repevent.Nodes(nodes)) retval = reporter(repevent.TestFinished()) self.kill_server(startserverflag) diff --git a/py/test/rsession/testing/test_rsession.py b/py/test/rsession/testing/test_rsession.py index 992a6759a..fb2de82ab 100644 --- a/py/test/rsession/testing/test_rsession.py +++ b/py/test/rsession/testing/test_rsession.py @@ -122,7 +122,7 @@ class TestRSessionRemote(DirSetup): tmpdir = py.test.ensuretemp("emptyconftest") config = py.test.config._reparse([tmpdir]) hm = HostManager(config, hosts) - nodes = hm.init_hosts(setup_events.append) + nodes = hm.setup_hosts(setup_events.append) hm.teardown_hosts(teardown_events.append, [node.channel for node in nodes], nodes) @@ -147,7 +147,7 @@ class TestRSessionRemote(DirSetup): config = py.test.config._reparse([]) hm = HostManager(config, hosts=hosts) - nodes = hm.init_hosts(allevents.append) + nodes = hm.setup_hosts(allevents.append) from py.__.test.rsession.testing.test_executor \ import ItemTestPassing, ItemTestFailing, ItemTestSkipping