1#! /bin/sh 2 3. ./tests.sh 4 5for x; do 6 shift 7 if [ "$x" = "-n" ]; then 8 for x; do 9 shift 10 if [ "$x" = "--" ]; then 11 break; 12 fi 13 NOCHECKS="$NOCHECKS $x" 14 done 15 break; 16 fi 17 if [ "$x" = "--" ]; then 18 break; 19 fi 20 YESCHECKS="$YESCHECKS $x" 21done 22 23LOG=tmp.log.$$ 24rm -f $LOG 25trap "rm -f $LOG" 0 26 27verbose_run_log "$LOG" $VALGRIND "$DTC" -o /dev/null "$@" 28ret="$?" 29 30FAIL_IF_SIGNAL $ret 31 32for c in $YESCHECKS; do 33 if ! grep -E "^(ERROR)|(Warning) \($c\):" $LOG > /dev/null; then 34 FAIL "Failed to trigger check \"$c\"" 35 fi 36done 37 38for c in $NOCHECKS; do 39 if grep -E "^(ERROR)|(Warning) \($c\):" $LOG > /dev/null; then 40 FAIL "Incorrectly triggered check \"$c\"" 41 fi 42done 43 44PASS 45