diff options
author | Stefan Stanacar <stefanx.stanacar@intel.com> | 2014-02-25 12:46:11 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-02-25 17:53:04 +0000 |
commit | 3ab2b7f10cbbcdd8b01036d67dea7567880246ce (patch) | |
tree | 95e30a107438d9a49aa75ff7e1025f79c0eef828 /meta | |
parent | 16d271c14bd2f98391aee52a11593480acefee6b (diff) | |
download | poky-3ab2b7f10cbbcdd8b01036d67dea7567880246ce.tar.gz |
oeqa/targetcontrol: properly get the host ip
For the SimpleRemote target where we need the host ip and
it wasn't set in conf, we tried to determine it automatically.
However ip route output isn't the same for every network, we
need the last field from the first line.
(From OE-Core rev: 19af3ac53690b1bd2fee54827090f59c525d2236)
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/lib/oeqa/targetcontrol.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/targetcontrol.py b/meta/lib/oeqa/targetcontrol.py index ba5e6e5dc1..46e5f7fa6b 100644 --- a/meta/lib/oeqa/targetcontrol.py +++ b/meta/lib/oeqa/targetcontrol.py | |||
@@ -133,7 +133,7 @@ class SimpleRemoteTarget(BaseTarget): | |||
133 | self.server_ip = d.getVar("TEST_SERVER_IP", True) | 133 | self.server_ip = d.getVar("TEST_SERVER_IP", True) |
134 | if not self.server_ip: | 134 | if not self.server_ip: |
135 | try: | 135 | try: |
136 | self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split()[6] | 136 | self.server_ip = subprocess.check_output(['ip', 'route', 'get', self.ip ]).split("\n")[0].split()[-1] |
137 | except Exception as e: | 137 | except Exception as e: |
138 | bb.fatal("Failed to determine the host IP address (alternatively you can set TEST_SERVER_IP with the IP address of this machine): %s" % e) | 138 | bb.fatal("Failed to determine the host IP address (alternatively you can set TEST_SERVER_IP with the IP address of this machine): %s" % e) |
139 | bb.note("Server IP: %s" % self.server_ip) | 139 | bb.note("Server IP: %s" % self.server_ip) |