summaryrefslogtreecommitdiff
path: root/meta/lib/oeqa
diff options
context:
space:
mode:
authorSipke Vriend <sipke.vriend@xilinx.com>2014-01-28 08:25:09 +1000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-01-28 00:48:29 +0000
commit091d395e43836575587112ee1696a18c401505bb (patch)
tree3cd8b280a718e21805881856d38f6cc85f96811c /meta/lib/oeqa
parent24188967209bad291545909ddb89af35ab3f6021 (diff)
downloadopenembedded-core-091d395e43836575587112ee1696a18c401505bb.tar.gz
openembedded-core-091d395e43836575587112ee1696a18c401505bb.tar.bz2
openembedded-core-091d395e43836575587112ee1696a18c401505bb.zip
lib/oeqa: sshcontrol: Allow alternate port for SSHControl
Add an optional parameter to SSHControl so the user can specify and alternate port to the default (22). Signed-off-by: Sipke Vriend <sipke.vriend@xilinx.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r--meta/lib/oeqa/utils/sshcontrol.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/sshcontrol.py b/meta/lib/oeqa/utils/sshcontrol.py
index 3e53ec3e89..891325048c 100644
--- a/meta/lib/oeqa/utils/sshcontrol.py
+++ b/meta/lib/oeqa/utils/sshcontrol.py
@@ -13,7 +13,7 @@ import select
class SSHControl(object):
- def __init__(self, ip=None, timeout=300, logfile=None):
+ def __init__(self, ip=None, timeout=300, logfile=None, port=None):
self.ip = ip
self.timeout = timeout
self._starttime = None
@@ -26,6 +26,8 @@ class SSHControl(object):
'-o', 'LogLevel=ERROR'
]
self.ssh = ['ssh', '-l', 'root'] + self.ssh_options
+ if port:
+ self.ssh = self.ssh + ['-p', str(port)]
def log(self, msg):
if self.logfile: