]> code.ossystems Code Review - openembedded-core.git/commitdiff
strace: show test suite log on failure
authorRoss Burton <ross@burtonini.com>
Fri, 22 Oct 2021 09:49:43 +0000 (10:49 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 23 Oct 2021 16:41:46 +0000 (17:41 +0100)
If the tests fail, dump the log so we can see the failures.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/strace/strace/run-ptest

index 3a51fb0be9d8b844cd4b285d8da4ac0da4aa53a4..02bb91e07feefbebcca81c1b7d0c881e7a1929f5 100755 (executable)
@@ -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