mesa-drm/intel/tests/test-batch.sh
Nicholas Bishop dd562b1efd intel: properly escape sed pattern for tests
The sed was incorrectly modifying e.g. "nicholasbishop" to
"nicholasbop". The updated pattern will only match `.sh` at the end of
the string.

Signed-off-by: Nicholas Bishop <nicholasbishop@gmail.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
2020-04-27 15:53:58 +00:00

20 lines
468 B
Bash
Executable file

#!/bin/sh
TEST_FILENAME=`echo "$0" | sed 's|\.sh$||'`
./test_decode $TEST_FILENAME
ret=$?
# pretty-print a diff showing what happened, and leave the dumped
# around for possibly moving over the ref.
if test $ret = 1; then
REF_FILENAME="$TEST_FILENAME-ref.txt"
NEW_FILENAME="$TEST_FILENAME-new.txt"
./test_decode $TEST_FILENAME -dump > $NEW_FILENAME
if test $? = 0; then
echo "Differences:"
diff -u $REF_FILENAME $NEW_FILENAME
fi
fi
exit $ret