[py-svn] r31611 - py/branch/distributed/py/test/rsession
fijal at codespeak.net
fijal at codespeak.net
Thu Aug 24 16:32:25 CEST 2006
Author: fijal
Date: Thu Aug 24 16:32:24 2006
New Revision: 31611
Modified:
py/branch/distributed/py/test/rsession/hostmanage.py
Log:
Fixed multiple running of the same hosts
Modified: py/branch/distributed/py/test/rsession/hostmanage.py
==============================================================================
--- py/branch/distributed/py/test/rsession/hostmanage.py (original)
+++ py/branch/distributed/py/test/rsession/hostmanage.py Thu Aug 24 16:32:24 2006
@@ -13,10 +13,19 @@
nodes = []
nodes_lock = threading.Condition()
exc_info = [None]
+ rsync_hosts = {}
def host_init(host):
try:
- report.wrapcall(reporter, bin_rsync,
+ nodes_lock.acquire()
+ if host in rsync_hosts:
+ do_rsync = False
+ else:
+ do_rsync = True
+ rsync_hosts[host] = True
+ nodes_lock.release()
+ if do_rsync:
+ report.wrapcall(reporter, bin_rsync,
str(pkgdir.dirpath())+"/", host, relpath)
gw = py.execnet.SshGateway(host)
ch = setup_slave(gw, os.path.join(relpath, pkgdir.basename))
More information about the pytest-commit
mailing list