aboutsummaryrefslogtreecommitdiff
path: root/src/cadet/loopcheck.sh
blob: b9e9d7b49dd49912923cbf521ccf4e65f46b5fb7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
while true; do
    if [ "$1" == "" ]; then
	taskset 1 make check || break;
    else
	LOGFILE="test_`date "+%m.%d-%H:%M:%S"`.log"
	taskset 1 $1 |& tee $LOGFILE | grep -v DEBUG;
	if [ "${PIPESTATUS[0]}" != "0" ]; then
	    echo "Failed";
	    date;
	    break;
	fi
    fi
    grep cadet test_*.log | grep -B 10 ERROR && break
    grep cadet test_*.log | grep -B 10 Assert && break
    ls core* &> /dev/null && break
done