diff mbox series

[yocto-autobuilder-helper] config.json: Improve logging on failed bitbake extra tests

Message ID 20260313-contrib-mathieu-extra-tests-logs-v1-1-4cf3a400fc83@bootlin.com
State New
Headers show
Series [yocto-autobuilder-helper] config.json: Improve logging on failed bitbake extra tests | expand

Commit Message

Mathieu Dubois-Briand March 13, 2026, 3:20 p.m. UTC
Use the xterm logging option to capture the whole bitbake extra tests
session, and show the log content when the tests fail.

Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
---
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(-)


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

Best regards,
diff mbox series

Patch

diff --git a/config.json b/config.json
index 45262c6256b0..c49378c8bea9 100644
--- a/config.json
+++ b/config.json
@@ -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" : {