[MERGED] buildserver-commons[master]: add cat_testlogs.sh

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Neels Hofmeyr gerrit-no-reply at lists.osmocom.org
Wed Sep 21 22:58:28 UTC 2016


Neels Hofmeyr has submitted this change and it was merged.

Change subject: add cat_testlogs.sh
......................................................................


add cat_testlogs.sh

To call from jenkins.sh: output all test logs when a build failed like
make check || cat_testlogs.sh

Change-Id: Ie3ad9513c1a2a493bac9d2b543c7736c01e34dfa
---
A cat_testlogs.sh
1 file changed, 21 insertions(+), 0 deletions(-)

Approvals:
  Neels Hofmeyr: Looks good to me, approved; Verified



diff --git a/cat_testlogs.sh b/cat_testlogs.sh
new file mode 100755
index 0000000..0d34a18
--- /dev/null
+++ b/cat_testlogs.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Intended for use in jenkins build jobs, like this:
+#    $MAKE check || ./contrib/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

-- 
To view, visit https://gerrit.osmocom.org/870
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3ad9513c1a2a493bac9d2b543c7736c01e34dfa
Gerrit-PatchSet: 1
Gerrit-Project: buildserver-commons
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>
Gerrit-Reviewer: neels_test_account <neels at hofmeyr.de>



More information about the gerrit-log mailing list