Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: other testsuite problems
- X-seq: zsh-workers 24316
- From: Clint Adams <clint@xxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: other testsuite problems
- Date: Mon, 24 Dec 2007 20:36:10 -0500
- In-reply-to: <20071224222325.GA32354@xxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20071224222325.GA32354@xxxxxxxxxxx>
On Mon, Dec 24, 2007 at 05:23:25PM -0500, Clint Adams wrote:
> Finally, if D07multibyte.ztst is skipped due to a lack of UTF-8 locale, it seems as though that is
> being registered as a failure. Perhaps a distinct exit code should be used for skips (and counting
> such in runtests.zsh).
To that end,
Index: Test/runtests.zsh
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/runtests.zsh,v
retrieving revision 1.1
diff -u -r1.1 runtests.zsh
--- Test/runtests.zsh 18 Dec 2007 21:16:30 -0000 1.1
+++ Test/runtests.zsh 25 Dec 2007 01:35:00 -0000
@@ -7,10 +7,13 @@
# 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 @@
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 ))
Index: Test/ztst.zsh
===================================================================
RCS file: /cvsroot/zsh/zsh/Test/ztst.zsh,v
retrieving revision 1.28
diff -u -r1.28 ztst.zsh
--- Test/ztst.zsh 18 Dec 2007 21:16:30 -0000 1.28
+++ Test/ztst.zsh 25 Dec 2007 01:35:00 -0000
@@ -467,6 +467,7 @@
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author