symbian-qemu-0.9.1-12/dtc-trunk/tests/dtc-checkfails.sh
changeset 1 2fb8b9db1c86
equal deleted inserted replaced
0:ffa851df0825 1:2fb8b9db1c86
       
     1 #! /bin/sh
       
     2 
       
     3 . ./tests.sh
       
     4 
       
     5 for x; do
       
     6     shift
       
     7     if [ "$x" = "--" ]; then
       
     8 	break;
       
     9     fi
       
    10     CHECKS="$CHECKS $x"
       
    11 done
       
    12 
       
    13 LOG="tmp.log.$$"
       
    14 
       
    15 rm -f $TMPFILE $LOG
       
    16 
       
    17 verbose_run_log "$LOG" $VALGRIND "$DTC" -o /dev/null "$@"
       
    18 ret="$?"
       
    19 
       
    20 if [ "$ret" -gt 127 ]; then
       
    21     signame=$(kill -l $[ret - 128])
       
    22     FAIL "Killed by SIG$signame"
       
    23 fi
       
    24 
       
    25 for c in $CHECKS; do
       
    26     if ! grep -E "^(ERROR)|(Warning) \($c\):" $LOG > /dev/null; then
       
    27 	FAIL "Failed to trigger check \"$c\""
       
    28     fi
       
    29 done
       
    30 
       
    31 rm -f $LOG
       
    32 
       
    33 PASS