diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-04 13:30:55 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-10-04 23:05:54 +0100 |
| commit | aaaa314807347d2a87cc80d29f41a547d7368ad7 (patch) | |
| tree | f7a26336efd7e909c71f36011f014d9d2a20a24b | |
| parent | 4abef7a9d9564c55ab4b8323ee4df9a5c8de6acd (diff) | |
| download | poky-aaaa314807347d2a87cc80d29f41a547d7368ad7.tar.gz | |
qemurunner: Log the second serial console as well as the first
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.
(From OE-Core rev: 372cd58fe672726900af80f3e65a108984da2750)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/lib/oeqa/utils/qemurunner.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/meta/lib/oeqa/utils/qemurunner.py b/meta/lib/oeqa/utils/qemurunner.py index b738a261d8..ea867a2934 100644 --- a/meta/lib/oeqa/utils/qemurunner.py +++ b/meta/lib/oeqa/utils/qemurunner.py | |||
| @@ -113,9 +113,9 @@ class QemuRunner: | |||
| 113 | msg = re_control_char.sub('', msg) | 113 | msg = re_control_char.sub('', msg) |
| 114 | return msg | 114 | return msg |
| 115 | 115 | ||
| 116 | def log(self, msg): | 116 | def log(self, msg, extension=""): |
| 117 | if self.logfile: | 117 | if self.logfile: |
| 118 | with codecs.open(self.logfile, "ab") as f: | 118 | with codecs.open(self.logfile + extension, "ab") as f: |
| 119 | f.write(msg) | 119 | f.write(msg) |
| 120 | self.msg += self.decode_qemulog(msg) | 120 | self.msg += self.decode_qemulog(msg) |
| 121 | 121 | ||
| @@ -477,10 +477,7 @@ class QemuRunner: | |||
| 477 | data = data + read | 477 | data = data + read |
| 478 | if data: | 478 | if data: |
| 479 | bootlog += data | 479 | bootlog += data |
| 480 | if self.serial_ports < 2: | 480 | self.log(data, extension = ".2") |
| 481 | # this file has mixed console/kernel data, log it to logfile | ||
| 482 | self.log(data) | ||
| 483 | |||
| 484 | data = b'' | 481 | data = b'' |
| 485 | 482 | ||
| 486 | decodedlog = self.decode_qemulog(bootlog) | 483 | decodedlog = self.decode_qemulog(bootlog) |
