mirror of
https://github.com/dgibson/dtc.git
synced 2025-12-07 13:45:07 -05:00
tests.sh has a bunch of shell setup that's sourced in a number of other scripts. It _doesn't_ actually run a bunch of tests, which is kind of what the name suggests. So rename it to be more obvious. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
24 lines
387 B
Bash
Executable file
24 lines
387 B
Bash
Executable file
#! /bin/sh
|
|
|
|
. ./testutils.sh
|
|
|
|
LOG=tmp.log.$$
|
|
EXPECT=tmp.expect.$$
|
|
rm -f $LOG $EXPECT
|
|
trap "rm -f $LOG $EXPECT" 0
|
|
|
|
expect="$1"
|
|
printf '%b\n' "$expect" > $EXPECT
|
|
shift
|
|
|
|
verbose_run_log_check "$LOG" $VALGRIND $DTGET "$@"
|
|
|
|
if cmp $EXPECT $LOG>/dev/null; then
|
|
PASS
|
|
else
|
|
if [ -z "$QUIET_TEST" ]; then
|
|
echo "EXPECTED :-:"
|
|
cat $EXPECT
|
|
fi
|
|
FAIL "Results differ from expected"
|
|
fi
|