From f8585a7c21f6ac2692a608bc60ffc715489616c3 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Tue, 18 Dec 2007 21:16:30 +0000 Subject: 24289 plus Ismail's suggestion 24290: count test scripts succeeded and failed --- Test/runtests.zsh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Test/runtests.zsh (limited to 'Test/runtests.zsh') diff --git a/Test/runtests.zsh b/Test/runtests.zsh new file mode 100644 index 000000000..1d4321576 --- /dev/null +++ b/Test/runtests.zsh @@ -0,0 +1,23 @@ +#!/bin/zsh -f + +emulate zsh + +# Run all specified tests, keeping count of which succeeded. +# The reason for this extra layer above the test script is to +# protect from catastrophic failure of an individual test. +# We could probably do that with subshells instead. + +integer success failure +for file in "${(f)ZTST_testlist}"; do + $ZTST_exe +Z -f $ZTST_srcdir/ztst.zsh $file + if (( $? )); then + (( failure++ )) + else + (( success++ )) + fi +done +print "************************************** +$success successful test script${${success:#1}:+s}, \ +$failure failure${${failure:#1}:+s} +**************************************" +return $(( failure ? 1 : 0 )) -- cgit 1.4.1