aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/cat-testlogs.sh
blob: 4ac00cff5922a5d092e320a4501a1f088b3ae13d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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