path: root/ci/
diff options
authorSZEDER Gábor <>2017-12-27 16:36:03 (GMT)
committerJunio C Hamano <>2017-12-27 20:15:22 (GMT)
commit677c70799c70a4e176ff3743c7daafe5193b7b2c (patch)
treed6c400214030abad6f759d44cd7867bf71392667 /ci/
parent7e72cfceed2e1e74e6bbe8ab41cacda4a66b0e4a (diff)
travis-ci: only print test failures if there are test results available
When a build job running the test suite fails, our 'ci/' script scans all 't/test-results/*.exit' files to find failed tests and prints their verbose output. However, if a build job were to fail before it ever gets to run the test suite, then there will be no files to match the above pattern and the shell will take the pattern literally, resulting in errors like this in the trace log: cat: t/test-results/*.exit: No such file or directory ------------------------------------------------------------------------ t/test-results/*.out... ------------------------------------------------------------------------ cat: t/test-results/*.out: No such file or directory Check upfront and proceed only if there are any such files present. Signed-off-by: SZEDER Gábor <> Reviewed-by: Lars Schneider <> Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'ci/')
1 files changed, 6 insertions, 0 deletions
diff --git a/ci/ b/ci/
index 97cc059..4f261dd 100755
--- a/ci/
+++ b/ci/
@@ -8,6 +8,12 @@
# Tracing executed commands would produce too much noise in the loop below.
set +x
+if ! ls t/test-results/*.exit >/dev/null 2>/dev/null
+ echo "Build job failed before the tests could have been run"
+ exit
for TEST_EXIT in t/test-results/*.exit
if [ "$(cat "$TEST_EXIT")" != "0" ]