You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
543 B
21 lines
543 B
#!/bin/bash |
|
set -eo pipefail |
|
cd "$(dirname "$0")" |
|
|
|
LAST=0; [ -f .check_time ] && read -r LAST < .check_time |
|
TMO=$(( LAST + 30 )) |
|
[ $TMO -lt 90 ] && TMO=90 |
|
|
|
START=$(date +%s) |
|
TMP=$(mktemp) |
|
timeout $TMO make check -j4 > "$TMP" 2>&1 || { |
|
tail -40 "$TMP"; rm -f "$TMP" |
|
[ $(date +%s) -ge $((START + TMO)) ] && echo "TIMEOUT (${TMO}s)" >&2 |
|
exit 1 |
|
} |
|
grep -E '\[PASS|\[FAIL|\[SKIP|Test Results|Failed tests|Log directory|^====' "$TMP" |
|
rm -f "$TMP" |
|
|
|
ELAPSED=$(( $(date +%s) - START )) |
|
echo "Time: ${ELAPSED}s" |
|
echo "$ELAPSED" > .check_time
|
|
|