2012-07-08 15:25:22 +02:00
|
|
|
#! /bin/sh
|
|
|
|
|
2019-10-09 12:20:17 +02:00
|
|
|
SRCDIR=`dirname "$0"`
|
|
|
|
. "$SRCDIR/testutils.sh"
|
2012-07-08 15:25:22 +02:00
|
|
|
|
|
|
|
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
|