about summary refs log tree commit diff
path: root/Test
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2007-12-25 01:40:16 +0000
committerClint Adams <clint@users.sourceforge.net>2007-12-25 01:40:16 +0000
commit4aef005bf8066a09812bab068eacda3e566597bc (patch)
treebc8be6e6bf7e2f6b86fcda3bc2ed65d6f7751465 /Test
parent746f80b77e9d2419882f120fae278382ed401b38 (diff)
downloadzsh-4aef005bf8066a09812bab068eacda3e566597bc.tar.gz
zsh-4aef005bf8066a09812bab068eacda3e566597bc.tar.xz
zsh-4aef005bf8066a09812bab068eacda3e566597bc.zip
24316: count skipped tests differently from successes and failures.
Diffstat (limited to 'Test')
-rw-r--r--Test/runtests.zsh10
-rwxr-xr-xTest/ztst.zsh1
2 files changed, 8 insertions, 3 deletions
diff --git a/Test/runtests.zsh b/Test/runtests.zsh
index 1d4321576..562234d91 100644
--- a/Test/runtests.zsh
+++ b/Test/runtests.zsh
@@ -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 ))
diff --git a/Test/ztst.zsh b/Test/ztst.zsh
index bd9cd5d1c..4b583a5a8 100755
--- a/Test/ztst.zsh
+++ b/Test/ztst.zsh
@@ -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