]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
qemurunner: Show both the login console log and all logging upon failure
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Oct 2023 12:34:03 +0000 (13:34 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Oct 2023 22:05:47 +0000 (23:05 +0100)
It is unclear when things fail which output was on which serial port. Improve the output
to show the last lines of both data to improve debugging.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oeqa/utils/qemurunner.py

index ea867a2934f17594d5bda72d793ce3f46f207e81..9aa2e7b3bea1d2560894a8057bd294ff1ec79731 100644 (file)
@@ -503,9 +503,8 @@ class QemuRunner:
                                   (self.boottime, time.strftime("%D %H:%M:%S")))
             tail = lambda l: "\n".join(l.splitlines()[-25:])
             bootlog = self.decode_qemulog(bootlog)
-            # in case bootlog is empty, use tail qemu log store at self.msg
-            lines = tail(bootlog if bootlog else self.msg)
-            self.logger.warning("Last 25 lines of text (%d):\n%s" % (len(bootlog), lines))
+            self.logger.warning("Last 25 lines of login console (%d):\n%s" % (len(bootlog), tail(bootlog)))
+            self.logger.warning("Last 25 lines of all logging (%d):\n%s" % (len(self.msg), tail(self.msg)))
             self.logger.warning("Check full boot log: %s" % self.logfile)
             self.stop()
             return False