Skip to contentSkip to conversation

config.json: Improve logging on failed bitbake extra tests

PATCH New Mathieu Dubois-Briand 1 participant 1 message Mar 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 config.json: Improve logging on failed bitbake extra tests

Use the xterm logging option to capture the whole bitbake extra tests session, and show the log content when the tests fail.

---
Log output is not so pretty [1], we have a lot of control characters, as the taskexp is using ncurses. Yet it's better than having almost no log, as we have today [2].

[1]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3408/steps/22/logs/stdio
[2]: https://autobuilder.yoctoproject.org/valkyrie/#/builders/35/builds/3388/steps/22/logs/stdio

---
 config.json | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
config.json +3 -1
index 45262c6256b0..c49378c8bea9 100644
@@ -291,7 +291,9 @@
             },
             "step5" : {
                 "shortname" : "Bitbake extra tests",
-                "EXTRACMDS" : ["DISPLAY=:1 xterm -geometry 90x30 -e ${SCRIPTSDIR}/bitbake-extra-tests; exit $(cat bbextratests-exitcode)"]
+                "EXTRACMDS" : ["DISPLAY=:1 xterm -geometry 90x30 -l -lf extra_tests.log -e ${SCRIPTSDIR}/bitbake-extra-tests; exit $(cat bbextratests-exitcode)",
+                               "if [ $(cat bbextratests-exitcode) -ne 0 ]; then echo 'Test failed, printing extra_tests.log'; tr -cd '[:print:][:space:]' < extra_tests.log; fi"
+                ]
             }
         },
         "reproducible" : {

---
base-commit: fbb31b12e73053727a0f8e34252661aff9e8398f
change-id: 20260313-contrib-mathieu-extra-tests-logs-e63305eb4159

Best regards,

Signature · 1 line
Mathieu Dubois-Briand <[email protected]>