1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-26 01:46:08 +02:00

24316: count skipped tests differently from successes and failures.

This commit is contained in:
Clint Adams 2007-12-25 01:40:16 +00:00
parent 746f80b77e
commit 4aef005bf8
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2007-12-24 Clint Adams <clint@zsh.org>
* 24316: Test/runtests.zsh, Test/ztst.zsh: count skipped tests
differently from successes and failures.
2007-12-20 Peter Stephenson <pws@csr.com>
* unposted: 4.3.4-dev-6.

View File

@ -7,10 +7,13 @@ emulate zsh
# protect from catastrophic failure of an individual test.
# We could probably do that with subshells instead.
integer success failure
integer success failure skipped retval
for file in "${(f)ZTST_testlist}"; do
$ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file
if (( $? )); then
retval=$?
if (( $retval == 2 )); then
(( skipped++ ))
elif (( $retval )); then
(( failure++ ))
else
(( success++ ))
@ -18,6 +21,7 @@ for file in "${(f)ZTST_testlist}"; do
done
print "**************************************
$success successful test script${${success:#1}:+s}, \
$failure failure${${failure:#1}:+s}
$failure failure${${failure:#1}:+s}, \
$skipped skipped
**************************************"
return $(( failure ? 1 : 0 ))

View File

@ -467,6 +467,7 @@ done
if [[ -n "$ZTST_unimplemented" ]]; then
print "$ZTST_testname: skipped ($ZTST_unimplemented)"
ZTST_testfailed=2
elif (( ! $ZTST_testfailed )); then
print "$ZTST_testname: all tests successful."
fi