diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2014-03-07 11:08:30 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-03-11 08:07:49 -0700 |
commit | c1f2a3c41969df0b7f08cf314b2cb7c9a6030092 (patch) | |
tree | e73d3c369066d009cb0c51d2936297ceb64c6ec9 /meta/lib/oeqa | |
parent | 14cc60db64975ad7cb8ae7d50e0233e9d59713df (diff) | |
download | openembedded-core-c1f2a3c41969df0b7f08cf314b2cb7c9a6030092.tar.gz openembedded-core-c1f2a3c41969df0b7f08cf314b2cb7c9a6030092.tar.bz2 openembedded-core-c1f2a3c41969df0b7f08cf314b2cb7c9a6030092.zip |
oeqa/targetcontrol: allow a custom port for SimpleRemoteTarget
We had the ability to use a custom port for the ssh connection,
but we weren't using it.
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa')
-rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index d8a6ac03ec..17871f5707 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py @@ -144,7 +144,12 @@ class SimpleRemoteTarget(BaseTarget): def __init__(self, d): super(SimpleRemoteTarget, self).__init__(d) - self.ip = d.getVar("TEST_TARGET_IP", True) or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.') + addr = d.getVar("TEST_TARGET_IP", True) or bb.fatal('Please set TEST_TARGET_IP with the IP address of the machine you want to run the tests on.') + self.ip = addr.split(":")[0] + try: + self.port = addr.split(":")[1] + except IndexError: + self.port = None bb.note("Target IP: %s" % self.ip) self.server_ip = d.getVar("TEST_SERVER_IP", True) if not self.server_ip: @@ -158,7 +163,7 @@ class SimpleRemoteTarget(BaseTarget): super(SimpleRemoteTarget, self).deploy() def start(self, params=None): - self.connection = SSHControl(self.ip, logfile=self.sshlog) + self.connection = SSHControl(self.ip, logfile=self.sshlog, port=self.port) def stop(self): self.connection = None |