summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKonrad Weihmann <kweihmann@outlook.com>2020-05-27 20:07:58 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-05-30 12:29:28 +0100
commit75f2471d15fab024775c59cb70c54e3f25f9ae72 (patch)
tree851fe986f5033be224ace1de3631a247cf4164be
parent7a578c760aa32f62bf39be7289de1516ad97e92e (diff)
downloadopenembedded-core-75f2471d15fab024775c59cb70c54e3f25f9ae72.tar.gz
qemurunner: fix ip fallback detection
When falling back from detecting ip from /proc/./cmdline the output of runqemu is acutally 'Network configuration: ip=192.168.7.2::192.168.7.1::255.255.255.0' which doesn't match the given regex and leading to run failure, although IP is detectable. Fix regex by inserting an optional 'ip=' prefix to first IP Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/lib/oeqa/utils/qemurunner.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py
index 4b74337652..992fff9370 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -290,7 +290,7 @@ class QemuRunner:
self.logger.debug("qemu cmdline used:\n{}".format(cmdline))
except (IndexError, ValueError):
# Try to get network configuration from runqemu output
- match = re.match(r'.*Network configuration: ([0-9.]+)::([0-9.]+):([0-9.]+)$.*',
+ match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+)$.*',
out, re.MULTILINE|re.DOTALL)
if match:
self.ip, self.server_ip, self.netmask = match.groups()