aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-27 01:34:20 +0200
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-09-27 01:34:20 +0200
commit79480b6f81a6d9a91eb24a6c05883cf8eef1e4d6 (patch)
treedb447e36a0f66097461ae8ca04bf7e8cc73e1ffc /scripts
parentc8f48b469ca6d169a893a6ac5260945ed45811a7 (diff)
add cat-testlogs.sh
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/cat-testlogs.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/scripts/cat-testlogs.sh b/scripts/cat-testlogs.sh
new file mode 100755
index 0000000..4ac00cf
--- /dev/null
+++ b/scripts/cat-testlogs.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Intended for use in jenkins build jobs, like this:
+# export PATH="$PATH:/usr/local/src/buildserver-commons"
+# $MAKE check || cat-testlogs.sh
+#
+# In the jenkins console output, show the actual failures by printing the test
+# logs to the console output. This way we can see how exactly the test failed
+# even if a job is older and no workspace is available.
+
+set +x
+find . -path "*/testsuite.dir/*/testsuite.log" | while read testlog; do
+ echo
+ echo
+ echo
+ echo ======================== "$testlog"
+ echo
+ cat $testlog
+done
+
+# this will be called after a test failure, so make sure to return an error
+exit 1