On Mon, Jan 22, 2018 at 1:27 PM, SZEDER Gábor <szeder.dev@xxxxxxxxx> wrote: > Subject: [PATCH] travis-ci: include the trash directories of failed tests in > the trace log > > The trash directory of a failed test might contain valuable > 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 trace log, so... > > Modify 'ci/print-test-failures.sh' to create a tar.gz archive of the > test directory of each failed test and encode it with base64, so the > result is a block of ASCII text that can be safely included in the > trace log, along with a hint about how to restore it. Furthermore, > run tests with '--immediate' to faithfully preserve the failed state. > > A few of our tests create a sizeable trash directory, so limit the > size of each included base64-encoded block, let's say, to 1MB. > > Note: > > - The logs of Linux build jobs coming from Travis CI have mostly > CRLF line endings, which makes 'base64 -d' from 'coreutils' > complain about "invalid input"; it has to be converted to LF > first. 'openssl base64 -d' can grok it just fine, even without > conversion. > > - The logs of OSX build jobs have CRCRLF line endings. However, the > 'base64' util of OSX doesn't wrap its output at 76 columns, i.e. > prints one single albeit very long line. This means that while Perhaps you could pipe the 'base64' output through 'fold' or 'fmt'? > 'base64' from 'coreutils' still complains, by the time it gets to > the invalid input it already decoded everything and produced a > valid .tar.gz. OTOH, 'openssl base64 -d' doesn't grok it, but > exits without any error message or even an error code, even after > converting to CRLF or LF line endings. > > Go figure. > > Signed-off-by: SZEDER Gábor <szeder.dev@xxxxxxxxx>