summaryrefslogtreecommitdiffstats
path: root/qemu/dtc/tests/dtc-fails.sh
blob: 4ddcb273243739186994a3b70077e4fe7cd14916 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#! /bin/sh

. ./tests.sh

if [ "$1" = "-n" ]; then
    NEG="$1"
    shift
fi

OUTPUT="$1"
shift

verbose_run $VALGRIND "$DTC" -o "$OUTPUT" "$@"
ret="$?"

FAIL_IF_SIGNAL $ret

if [ -n "$NEG" ]; then
    if [ ! -e "$OUTPUT" ]; then
	FAIL "Produced no output"
    fi
else
    if [ -e "$OUTPUT" ]; then
	FAIL "Incorrectly produced output"
    fi
fi

rm -f "$OUTPUT"

PASS