travis-ci: fine tune the use of 'set -x' in 'ci/*' scripts
[git] / ci / print-test-failures.sh
1 #!/bin/sh
2 #
3 # Print output of failing tests
4 #
5
6 . ${0%/*}/lib-travisci.sh
7
8 # Tracing executed commands would produce too much noise in the loop below.
9 set +x
10
11 for TEST_EXIT in t/test-results/*.exit
12 do
13         if [ "$(cat "$TEST_EXIT")" != "0" ]
14         then
15                 TEST_OUT="${TEST_EXIT%exit}out"
16                 echo "------------------------------------------------------------------------"
17                 echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)"
18                 echo "------------------------------------------------------------------------"
19                 cat "${TEST_OUT}"
20         fi
21 done