summaryrefslogtreecommitdiff
path: root/help.c
diff options
context:
space:
mode:
authorSZEDER Gábor <szeder.dev@gmail.com>2018-07-31 22:56:12 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-08-01 16:59:36 (GMT)
commitaea8879a6ac54dd3bc552812061130d0ff451cc2 (patch)
tree22cd1b278ff42da770a2fb49fe5cc0b15b3018e9 /help.c
parent53f9a3e157dbbc901a02ac2c73346d375e24978c (diff)
downloadgit-aea8879a6ac54dd3bc552812061130d0ff451cc2.zip
git-aea8879a6ac54dd3bc552812061130d0ff451cc2.tar.gz
git-aea8879a6ac54dd3bc552812061130d0ff451cc2.tar.bz2
travis-ci: include the trash directories of failed tests in the trace log
The trash directory of a failed test might contain invaluable information about the cause of the failure, but we have no access to the trash directories of Travis CI build jobs. The only feedback we get from there is the build job's trace log, so... Modify 'ci/print-test-failures.sh' to create a tar.gz archive of the trash directory of each failed test, encode that archive with base64, and print the resulting block of ASCII text, so it gets embedded in the trace log. Furthermore, run tests with '--immediate' to faithfully preserve the failed state. Extracting the trash directories from the trace log turned out to be a bit of a hassle, partly because of the size of these logs (usually resulting in several hundreds or even thousands of lines of base64-encoded text), and partly because these logs have CRLF, CRCRLF and occasionally even CRCRCRLF line endings, which cause 'base64 -d' from coreutils to complain about "invalid input". For convenience add a small script 'ci/util/extract-trash-dirs.sh', which will extract and unpack all base64-encoded trash directories embedded in the log fed to its standard input, and include an example command to be copy-pasted into a terminal to do it all at the end of the failure report. A few of our tests create sizeable trash directories, so limit the size of each included base64-encoded block, let's say, to 1MB. And just in case something fundamental gets broken and a lot of tests fail at once, don't include trash directories when the combined size of the included base64-encoded blocks would exceed 1MB. Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'help.c')
0 files changed, 0 insertions, 0 deletions