File: test-batch.sh

package info (click to toggle)
libdrm 2.4.40-1~deb7u2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 4,836 kB
  • sloc: ansic: 26,265; sh: 11,086; makefile: 423
file content (20 lines) | stat: -rwxr-xr-x 466 bytes parent folder | download | duplicates (36)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/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