Skip to content

Commit

Permalink
Fix --distribute-workers option when using host:port, use fullpath fo…
Browse files Browse the repository at this point in the history
…r virtualenv dir
  • Loading branch information
bdelbosc committed Apr 15, 2014
1 parent a68a29e commit e0230ac
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/funkload/Distributed.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def __init__(self, name, host, username=None, password=None,
credentials = {}
if username and password:
credentials = {"username": username, "password": password}
if username and key_filename:
elif username and key_filename:
credentials = {"username": username, "key_filename": key_filename}
elif username:
credentials = {"username": username}
Expand All @@ -133,6 +133,7 @@ def __init__(self, name, host, username=None, password=None,
else:
port = 22
try:
# print "connect to " + host + " port " + str(port) + " " + str(credentials)
self.connection.connect(host, timeout=5, port=port, **credentials)
self.connected = True
except socket.gaierror, error:
Expand Down Expand Up @@ -381,7 +382,7 @@ def __init__(self, module_name, class_name, method_name, options,
else:
uname, pwd = uname_pwd

worker = {"name": host,
worker = {"name": host.replace(":", "_"),
"host": host,
"password": pwd,
"username": uname,
Expand All @@ -401,7 +402,7 @@ def __init__(self, module_name, class_name, method_name, options,
key_filename = test.conf_get(host, 'ssh_key', '')

workers.append({
"name": host,
"name": host.replace(":", "_"),
"host": test.conf_get(host, "host", host),
"password": test.conf_get(host, 'password', ''),
"username": test.conf_get(host, 'username', ''),
Expand Down Expand Up @@ -496,7 +497,7 @@ def local_prep_worker(worker):
trace(".")
worker.execute(
"%s virtualenv.py %s" % (
self.python_bin, self.tarred_testsdir),
self.python_bin, os.path.join(remote_res_dir, self.tarred_testsdir)),
cwdir=remote_res_dir)

tarball = os.path.split(self.tarred_tests)[1]
Expand Down

0 comments on commit e0230ac

Please sign in to comment.