4 if test "$TESTS"x = x ; then
5 for i in $SRCDIR/tests/*.img.bz2
7 TESTS="$TESTS `basename $i .img.bz2`"
16 if test ! -f $SRCDIR/tests/$i.img.bz2 -a \
17 ! -f $SRCDIR/tests/$i.results ;
22 bunzip2 < $SRCDIR/tests/$i.img.bz2 > tests/tmp/test.img.$$
23 # swap is native-endian, so regenerate before testing
24 if [ "$i" == "swap0" ]; then
25 mkswap -v0 tests/tmp/test.img.$$ > /dev/null
26 elif [ "$i" == "swap1" ]; then
27 mkswap -v1 -L SWAP-TEST -U 8ff8e77f-8553-485e-8656-58be67a81666 tests/tmp/test.img.$$ >/dev/null
29 ./tst_probe tests/tmp/test.img.$$ > tests/$i.out
30 /bin/rm -f tests/tmp/test.img.$$ tests/$i.ok tests/$i.failed
31 cmp -s tests/$i.out $SRCDIR/tests/$i.results
37 diff -c tests/$i.out $SRCDIR/tests/$i.results > tests/$i.failed
41 num_ok=`ls tests/*.ok 2>/dev/null | wc -l`
42 num_failed=`ls tests/*.failed 2>/dev/null | wc -l`
44 echo "$num_ok tests succeeded $num_failed tests failed"
46 test "$num_failed" -eq 0 || exit 1