Skip to content
  • Gábor Szeder's avatar
    travis-ci: only print test failures if there are test results available · 677c7079
    Gábor Szeder authored and Junio C Hamano's avatar Junio C Hamano committed
    
    
    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: default avatarSZEDER Gábor <szeder.dev@gmail.com>
    Reviewed-by: default avatarLars Schneider <larsxschneider@gmail.com>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    677c7079