Skip to contentSkip to conversation

strace: show test suite log on failure

PATCH New Ross Burton 1 participant 1 message Oct 22, 2021

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 strace: show test suite log on failure

If the tests fail, dump the log so we can see the failures.

---
 meta/recipes-devtools/strace/strace/run-ptest | 9 +++++++++
 1 file changed, 9 insertions(+)
meta/recipes-devtools/strace/strace/run-ptest +9 -0
index 3a51fb0be9..02bb91e07f 100755
@@ -1,6 +1,15 @@
 #!/bin/sh
+
+set -u
+
 export TIMEOUT_DURATION=240
 chown nobody tests
 chown nobody tests/*
 chown nobody ../ptest
+
 su nobody -c "make -B -C tests -k test-suite.log"
+res=$?
+if [ $res -ne 0 ]; then
+    cat tests/test-suite.log
+fi
+exit $res
Signature · 1 line
2.25.1