From 7f98d0ffaf305fff5afb684f251d98a4cec61f23 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 25 Mar 2019 10:33:21 +0000 Subject: oeqa/qemurunner: Dont mix binary and non-binary strings self.msg is a str(), bootlog is b'' so this code clearly doesn't work. Add in a decode since its being used as a string. (From OE-Core rev: e7546759d3102b576974bbab52594796f084721e) Signed-off-by: Richard Purdie --- meta/lib/oeqa/utils/qemurunner.py | 1 + 1 file changed, 1 insertion(+) (limited to 'meta/lib/oeqa/utils') diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index 7ef506b60a..49020c1e63 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py @@ -329,6 +329,7 @@ class QemuRunner: self.logger.debug("Target didn't reach login banner in %d seconds (%s)" % (self.boottime, time.strftime("%D %H:%M:%S"))) tail = lambda l: "\n".join(l.splitlines()[-25:]) + bootlog = boolog.decode("utf-8") # in case bootlog is empty, use tail qemu log store at self.msg lines = tail(bootlog if bootlog else self.msg) self.logger.debug("Last 25 lines of text:\n%s" % lines) -- cgit v1.2.3-54-g00ecf