summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils
diff options
context:
space:
mode:
authorKonrad Weihmann <kweihmann@outlook.com>2020-05-27 20:07:58 +0200
committerSteve Sakoman <steve@sakoman.com>2020-05-30 12:12:33 -1000
commit9c2efe41d5d894094552c4bbc4180675a5aac751 (patch)
treeee97eaa89d1e0a6f5d5afc79215515e4002c4762 /meta/lib/oeqa/utils
parentce5500cc07da270322b67db5001fc1476b6bf2fe (diff)
downloadopenembedded-core-contrib-9c2efe41d5d894094552c4bbc4180675a5aac751.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> (cherry picked from commit 75f2471d15fab024775c59cb70c54e3f25f9ae72) Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/lib/oeqa/utils')
-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 cd95d33bdc..77ae08ebeb 100644
--- a/meta/lib/oeqa/utils/qemurunner.py
+++ b/meta/lib/oeqa/utils/qemurunner.py
@@ -287,7 +287,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()