testsuite: show the number of failures after a test run

Signed-off-by: Dan Fandrich <dan@coneharvesters.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Dan Fandrich
2010-08-29 04:47:03 +02:00
committed by Denys Vlasenko
parent 91234b9be0
commit 140ac91fe1
4 changed files with 21 additions and 2 deletions

View File

@@ -1,6 +1,8 @@
#!/bin/sh
# Used by both gunzip and bunzip2 tests
FAILCOUNT=0
if test "${0##*/}" = "gunzip.tests"; then
unpack=gunzip
ext=gz
@@ -473,6 +475,7 @@ check() {
echo "PASS: $1"
else
echo "FAIL: $1"
FAILCOUNT=$((FAILCOUNT + 1))
fi
}
@@ -520,5 +523,8 @@ if test "${0##*/}" = "bunzip2.tests"; then
echo "PASS: $unpack: test bz2 file"
else
echo "FAIL: $unpack: test bz2 file"
FAILCOUNT=$((FAILCOUNT + 1))
fi
fi
exit $((FAILCOUNT <= 255 ? FAILCOUNT : 255))