2007-11-20 06:24:23 +01:00
|
|
|
#! /bin/sh
|
|
|
|
|
2008-05-29 08:16:21 +02:00
|
|
|
. ./tests.sh
|
2007-11-20 06:24:23 +01:00
|
|
|
|
2007-12-06 06:56:55 +01:00
|
|
|
for x; do
|
|
|
|
shift
|
|
|
|
if [ "$x" = "--" ]; then
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
CHECKS="$CHECKS $x"
|
|
|
|
done
|
2007-11-20 06:24:23 +01:00
|
|
|
|
2012-02-03 06:12:04 +01:00
|
|
|
LOG=tmp.log.$$
|
2012-02-03 06:12:03 +01:00
|
|
|
rm -f $LOG
|
2012-02-03 06:12:04 +01:00
|
|
|
trap "rm -f $LOG" 0
|
2007-12-06 06:56:55 +01:00
|
|
|
|
2008-03-05 06:01:55 +01:00
|
|
|
verbose_run_log "$LOG" $VALGRIND "$DTC" -o /dev/null "$@"
|
2007-11-20 06:24:23 +01:00
|
|
|
ret="$?"
|
|
|
|
|
2007-12-07 05:37:45 +01:00
|
|
|
if [ "$ret" -gt 127 ]; then
|
2008-03-05 06:01:55 +01:00
|
|
|
signame=$(kill -l $[ret - 128])
|
|
|
|
FAIL "Killed by SIG$signame"
|
2007-12-07 05:37:45 +01:00
|
|
|
fi
|
|
|
|
|
2007-12-06 06:56:55 +01:00
|
|
|
for c in $CHECKS; do
|
|
|
|
if ! grep -E "^(ERROR)|(Warning) \($c\):" $LOG > /dev/null; then
|
2007-12-07 08:08:20 +01:00
|
|
|
FAIL "Failed to trigger check \"$c\""
|
2007-12-06 06:56:55 +01:00
|
|
|
fi
|
|
|
|
done
|
2007-11-20 06:24:23 +01:00
|
|
|
|
2007-12-06 06:56:55 +01:00
|
|
|
PASS
|