eaec1dbc59
On Ubuntu, /bin/sh is dash (at least by default), and dash's echo doesn't accept the -e option. This means that fdtget-runtest.sh's EXPECT file will contain "-e foo" rather than just "foo", which causes a test failure. To work around this, run /bin/echo instead of (builtin) echo, which has more chance of supporting the -e option. Another possible fix is to change all the #! lines to /bin/bash rather than /bin/sh, and change run_tests.sh to invoke sub-scripts using $SHELL instead of just "sh". However, that would require bash specifically, which may not be desirable. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org> Acked-by: David Gibson <david@gibson.dropbear.id.au>
24 lines
379 B
Bash
Executable file
24 lines
379 B
Bash
Executable file
#! /bin/sh
|
|
|
|
. ./tests.sh
|
|
|
|
LOG=tmp.log.$$
|
|
EXPECT=tmp.expect.$$
|
|
rm -f $LOG $EXPECT
|
|
trap "rm -f $LOG $EXPECT" 0
|
|
|
|
expect="$1"
|
|
/bin/echo -e $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
|