2007-11-20 06:24:23 +01:00
|
|
|
#! /bin/sh
|
|
|
|
|
2019-10-09 12:20:17 +02:00
|
|
|
SRCDIR=`dirname "$0"`
|
|
|
|
. "$SRCDIR/testutils.sh"
|
2007-11-20 06:24:23 +01:00
|
|
|
|
2007-12-06 06:56:55 +01:00
|
|
|
for x; do
|
|
|
|
shift
|
2012-07-08 15:25:22 +02:00
|
|
|
if [ "$x" = "-n" ]; then
|
|
|
|
for x; do
|
|
|
|
shift
|
|
|
|
if [ "$x" = "--" ]; then
|
|
|
|
break;
|
|
|
|
fi
|
|
|
|
NOCHECKS="$NOCHECKS $x"
|
|
|
|
done
|
|
|
|
break;
|
|
|
|
fi
|
2007-12-06 06:56:55 +01:00
|
|
|
if [ "$x" = "--" ]; then
|
|
|
|
break;
|
|
|
|
fi
|
2012-07-08 15:25:22 +02:00
|
|
|
YESCHECKS="$YESCHECKS $x"
|
2007-12-06 06:56:55 +01:00
|
|
|
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="$?"
|
|
|
|
|
2012-02-03 06:12:06 +01:00
|
|
|
FAIL_IF_SIGNAL $ret
|
2007-12-07 05:37:45 +01:00
|
|
|
|
2012-07-08 15:25:22 +02:00
|
|
|
for c in $YESCHECKS; do
|
2018-06-15 23:37:14 +02:00
|
|
|
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
|
|
|
|
2012-07-08 15:25:22 +02:00
|
|
|
for c in $NOCHECKS; do
|
2018-06-15 23:37:14 +02:00
|
|
|
if grep -E "(ERROR|Warning) \($c\):" $LOG > /dev/null; then
|
2012-07-08 15:25:22 +02:00
|
|
|
FAIL "Incorrectly triggered check \"$c\""
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2007-12-06 06:56:55 +01:00
|
|
|
PASS
|