]> git.ipfire.org Git - thirdparty/git.git/blame - ci/print-test-failures.sh
Merge branch 'bp/fsmonitor'
[thirdparty/git.git] / ci / print-test-failures.sh
CommitLineData
657343a6
LS
1#!/bin/sh
2#
3# Print output of failing tests
4#
5
6. ${0%/*}/lib-travisci.sh
7
a8b8b6b8
SG
8# Tracing executed commands would produce too much noise in the loop below.
9set +x
10
677c7079
SG
11if ! ls t/test-results/*.exit >/dev/null 2>/dev/null
12then
13 echo "Build job failed before the tests could have been run"
14 exit
15fi
16
657343a6 17for TEST_EXIT in t/test-results/*.exit
f67242c1
JH
18do
19 if [ "$(cat "$TEST_EXIT")" != "0" ]
20 then
21 TEST_OUT="${TEST_EXIT%exit}out"
22 echo "------------------------------------------------------------------------"
23 echo "$(tput setaf 1)${TEST_OUT}...$(tput sgr0)"
24 echo "------------------------------------------------------------------------"
25 cat "${TEST_OUT}"
26 fi
657343a6 27done