]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commitdiff
qemurunner: Log the second serial console as well as the first
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Oct 2023 12:30:55 +0000 (13:30 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Oct 2023 22:05:46 +0000 (23:05 +0100)
To aid debugging, always log the second serial console as well as the first
to a seperate log file. This should make it clearer what happened when we
see test failures.

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

index b738a261d879b6f4b2284e20d3710be9457982af..ea867a2934f17594d5bda72d793ce3f46f207e81 100644 (file)
@@ -113,9 +113,9 @@ class QemuRunner:
         msg = re_control_char.sub('', msg)
         return msg
 
-    def log(self, msg):
+    def log(self, msg, extension=""):
         if self.logfile:
-            with codecs.open(self.logfile, "ab") as f:
+            with codecs.open(self.logfile + extension, "ab") as f:
                 f.write(msg)
         self.msg += self.decode_qemulog(msg)
 
@@ -477,10 +477,7 @@ class QemuRunner:
                     data = data + read
                     if data:
                         bootlog += data
-                        if self.serial_ports < 2:
-                            # this file has mixed console/kernel data, log it to logfile
-                            self.log(data)
-
+                        self.log(data, extension = ".2")
                         data = b''
 
                         decodedlog = self.decode_qemulog(bootlog)