[py-svn] r38022 - in py/trunk/py/test/rsession: . testing
fijal at codespeak.net
fijal at codespeak.net
Tue Feb 6 19:57:16 CET 2007
Author: fijal
Date: Tue Feb 6 19:57:14 2007
New Revision: 38022
Modified:
py/trunk/py/test/rsession/hostmanage.py
py/trunk/py/test/rsession/repevent.py
py/trunk/py/test/rsession/reporter.py
py/trunk/py/test/rsession/rest.py
py/trunk/py/test/rsession/testing/test_reporter.py
py/trunk/py/test/rsession/testing/test_rest.py
py/trunk/py/test/rsession/web.py
Log:
be a bit more verbose before rsync.
Modified: py/trunk/py/test/rsession/hostmanage.py
==============================================================================
--- py/trunk/py/test/rsession/hostmanage.py (original)
+++ py/trunk/py/test/rsession/hostmanage.py Tue Feb 6 19:57:14 2007
@@ -120,18 +120,17 @@
roots = [self.config.topdir]
self.roots = roots
- def prepare_gateways(self):
+ def prepare_gateways(self, reporter):
dist_remotepython = self.config.getvalue("dist_remotepython")
for host in self.hosts:
host.initgateway(python=dist_remotepython)
+ reporter(repevent.HostGatewayReady(host, self.roots))
host.gw.host = host
def init_rsync(self, reporter):
# send each rsync root
ignores = self.config.getvalue_pathlist("dist_rsync_ignore")
- self.prepare_gateways()
- for host in self.hosts:
- reporter(repevent.HostRSyncRoots(host, self.roots))
+ self.prepare_gateways(reporter)
for root in self.roots:
rsync = HostRSync(ignores=ignores)
destrelpath = root.relto(self.config.topdir)
Modified: py/trunk/py/test/rsession/repevent.py
==============================================================================
--- py/trunk/py/test/rsession/repevent.py (original)
+++ py/trunk/py/test/rsession/repevent.py Tue Feb 6 19:57:14 2007
@@ -77,7 +77,7 @@
def __init__(self, host):
self.host = host
-class HostRSyncRoots(ReportEvent):
+class HostGatewayReady(ReportEvent):
def __init__(self, host, roots):
self.host = host
self.roots = roots
Modified: py/trunk/py/test/rsession/reporter.py
==============================================================================
--- py/trunk/py/test/rsession/reporter.py (original)
+++ py/trunk/py/test/rsession/reporter.py Tue Feb 6 19:57:14 2007
@@ -60,8 +60,10 @@
print "%10s: RSYNC ==> %s" % (item.host.hostname[:10],
item.host.relpath)
- def report_HostRSyncRoots(self, item):
+ def report_HostGatewayReady(self, item):
self.to_rsync[item.host] = len(item.roots)
+ self.out.write("%10s: gateway initialised (PYTHONPATH = %s)\n"\
+ % (item.host.hostname, item.host.gw_remotepath))
def report_HostRSyncRootReady(self, item):
self.to_rsync[item.host] -= 1
Modified: py/trunk/py/test/rsession/rest.py
==============================================================================
--- py/trunk/py/test/rsession/rest.py (original)
+++ py/trunk/py/test/rsession/rest.py Tue Feb 6 19:57:14 2007
@@ -63,6 +63,9 @@
def report_ImmediateFailure(self, item):
pass
+ def report_HostGatewayReady(self, item):
+ self.to_rsync[item.host] = len(item.roots)
+
def report_ItemStart(self, event):
item = event.item
if isinstance(item, py.test.collect.Module):
Modified: py/trunk/py/test/rsession/testing/test_reporter.py
==============================================================================
--- py/trunk/py/test/rsession/testing/test_reporter.py (original)
+++ py/trunk/py/test/rsession/testing/test_reporter.py Tue Feb 6 19:57:14 2007
@@ -162,7 +162,7 @@
r = self.reporter(config, hosts)
r.report(repevent.TestStarted(hosts, config.topdir, ["a", "b", "c"]))
for host in hosts:
- r.report(repevent.HostRSyncRoots(host, ["a", "b", "c"]))
+ r.report(repevent.HostGatewayReady(host, ["a", "b", "c"]))
for host in hosts:
for root in ["a", "b", "c"]:
r.report(repevent.HostRSyncRootReady(host, root))
Modified: py/trunk/py/test/rsession/testing/test_rest.py
==============================================================================
--- py/trunk/py/test/rsession/testing/test_rest.py (original)
+++ py/trunk/py/test/rsession/testing/test_rest.py Tue Feb 6 19:57:14 2007
@@ -60,7 +60,7 @@
def test_report_HostRSyncRootReady(self):
h = HostInfo('localhost')
reporter.hosts_to_rsync = 1
- reporter.report(repevent.HostRSyncRoots(h, ["a"]))
+ reporter.report(repevent.HostGatewayReady(h, ["a"]))
event = repevent.HostRSyncRootReady(h, "a")
reporter.report(event)
assert stdout.getvalue() == '::\n\n localhost: READY\n\n'
Modified: py/trunk/py/test/rsession/web.py
==============================================================================
--- py/trunk/py/test/rsession/web.py (original)
+++ py/trunk/py/test/rsession/web.py Tue Feb 6 19:57:14 2007
@@ -303,7 +303,7 @@
def _host_ready(self, event):
self.pending_events.put(event)
- def report_HostRSyncRoots(self, item):
+ def report_HostGatewayReady(self, item):
self.to_rsync[item.host] = len(item.roots)
def report_HostRSyncRootReady(self, item):
More information about the pytest-commit
mailing list