diff options
author | 2017-05-31 15:56:09 +0200 | |
---|---|---|
committer | 2017-05-31 16:25:56 +0200 | |
commit | 7c1b6714fe73c6cd8685bccef58eb6839a57fcb9 (patch) | |
tree | ae5b1ef3301c64ca031f0391ba730cf03fafc07b /test-suite/save-logs.sh | |
parent | 6b4a57051a470436b50d53e7395ec44b52e2dc7e (diff) |
[travis] print failing test suite logs on failure
Diffstat (limited to 'test-suite/save-logs.sh')
-rwxr-xr-x | test-suite/save-logs.sh | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/test-suite/save-logs.sh b/test-suite/save-logs.sh index 131bcf545..fb8a1c1b0 100755 --- a/test-suite/save-logs.sh +++ b/test-suite/save-logs.sh @@ -1,5 +1,19 @@ #!/usr/bin/env bash -WHERE="logs" +SAVEDIR="logs" -rsync -a --from0 --files-from=<(find . -name '*.log' -print0) . "$WHERE" +# reset for local builds +rm -rf "$SAVEDIR" +mkdir "$SAVEDIR" + +# keep this synced with test-suite/Makefile +FAILMARK="==========> FAILURE <==========" + +FAILED=$(mktemp) +find . '(' -path ./bugs/opened -prune ')' -o '(' -name '*.log' -exec grep "$FAILMARK" -q '{}' ';' -print0 ')' > "$FAILED" + +rsync -a --from0 --files-from="$FAILED" . "$SAVEDIR" +cp summary.log "$SAVEDIR"/ + +# cleanup +rm "$FAILED" |