aboutsummaryrefslogtreecommitdiffhomepage
path: root/test-suite/save-logs.sh
blob: b6136210850cc1347722f607bf39f2e199415ed1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash

SAVEDIR="logs"

# reset for local builds
rm -rf "$SAVEDIR"
mkdir "$SAVEDIR"

# keep this synced with test-suite/Makefile
FAILMARK="==========> FAILURE <=========="

FAILED=$(mktemp /tmp/coq-check-XXXXX)
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"