Commit graph

4 commits

Author SHA1 Message Date
SZEDER Gábor 677c70799c travis-ci: only print test failures if there are test results available
When a build job running the test suite fails, our
'ci/print-test-failures.sh' 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 <szeder.dev@gmail.com>
Reviewed-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-27 12:15:22 -08:00
SZEDER Gábor a8b8b6b87d travis-ci: fine tune the use of 'set -x' in 'ci/*' scripts
The change in commit 4f2636667 (travis-ci: use 'set -x' in 'ci/*'
scripts for extra tracing output, 2017-12-12) left a couple of rough
edges:

  - 'ci/run-linux32-build.sh' is executed in a Docker container and
    therefore doesn't source 'ci/lib-travisci.sh', which would enable
    tracing executed commands.  Enable 'set -x' in this script, too.

  - 'ci/print-test-failures.sh' iterates over all the files containing
    the exit codes of all the executed test scripts.  Since there are
    over 800 such files, the loop produces way too much noise with
    tracing executed commands enabled, so disable 'set -x' for this
    script.

  - 'ci/run-windows-build.sh' busily waits in a loop for the result of
    the Windows build, producing too much noise with tracing executed
    commands enabled as well.  Disable 'set -x' for the duration of
    that loop.

Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-12-27 12:13:46 -08:00
Junio C Hamano f67242c10d travis: dedent a few scripts that are indented overly deeply
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-09-11 10:18:29 +09:00
Lars Schneider 657343a602 travis-ci: move Travis CI code into dedicated scripts
Most of the Travis CI commands are in the '.travis.yml'. The yml format
does not support functions and therefore code duplication is necessary
to run commands across all builds.

To fix this, add a library for common CI functions. Move all Travis CI
code into dedicated scripts and make them call the library first.

Signed-off-by: Lars Schneider <larsxschneider@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2017-09-11 09:54:08 +09:00