historical/m0-applesillicon.git/xnu-qemu-arm64-5.1.0/dtc/tests/dtc-fails.sh

32 lines
402 B
Bash
Raw Normal View History

2024-01-16 17:20:27 +00:00
#! /bin/sh
SRCDIR=`dirname "$0"`
. "$SRCDIR/testutils.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