summaryrefslogtreecommitdiff
path: root/testsuite/bunzip2.tests
diff options
context:
space:
mode:
authorDan Fandrich2010-08-29 04:47:03 +0200
committerDenys Vlasenko2010-08-29 04:47:03 +0200
commit140ac91fe154c9a1bb33cba38380c3cc81e1cf15 (patch)
tree99cd795e3a239c626d832f7137d25cf776164a86 /testsuite/bunzip2.tests
parent91234b9be04a90f08ee4506955983338f9d3a29e (diff)
downloadbusybox-140ac91fe154c9a1bb33cba38380c3cc81e1cf15.zip
busybox-140ac91fe154c9a1bb33cba38380c3cc81e1cf15.tar.gz
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>
Diffstat (limited to 'testsuite/bunzip2.tests')
-rwxr-xr-xtestsuite/bunzip2.tests6
1 files changed, 6 insertions, 0 deletions
diff --git a/testsuite/bunzip2.tests b/testsuite/bunzip2.tests
index 734acbb..827aee8 100755
--- a/testsuite/bunzip2.tests
+++ b/testsuite/bunzip2.tests
@@ -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))