mirror of https://gitlab.com/qemu-project/dtc.git
33 lines
393 B
Bash
33 lines
393 B
Bash
# Common functions for shell testcases
|
|
|
|
PASS () {
|
|
echo "PASS"
|
|
exit 0
|
|
}
|
|
|
|
FAIL () {
|
|
echo "FAIL" "$@"
|
|
exit 2
|
|
}
|
|
|
|
DTC=../dtc
|
|
|
|
verbose_run () {
|
|
if [ -z "$QUIET_TEST" ]; then
|
|
"$@"
|
|
else
|
|
"$@" > /dev/null 2> /dev/null
|
|
fi
|
|
}
|
|
|
|
verbose_run_log () {
|
|
LOG="$1"
|
|
shift
|
|
"$@" &> "$LOG"
|
|
ret=$?
|
|
if [ -z "$QUIET_TEST" ]; then
|
|
cat "$LOG" >&2
|
|
fi
|
|
return $ret
|
|
}
|