zsh-workers
 help / color / mirror / code / Atom feed
From: "Jun. T" <takimoto-j@kba.biglobe.ne.jp>
To: zsh-workers@zsh.org
Subject: [PATCH] runtests.zsh: output name of crashed test script
Date: Thu, 29 Feb 2024 01:32:40 +0900	[thread overview]
Message-ID: <720C3DB0-489C-419D-8E54-D9428BC7F5C3@kba.biglobe.ne.jp> (raw)

If a test script (for example D04parameter.zsh as in my
previous post) crashes, runtests.zsh writes:
"xx successful test scripts, 1 failure, yy skipped"

But it takes some time to see which test has failed,
because ztst.zsh dies before writing
"./D04parameter.ztst: failed".

We need to look through all the output and find that
there is a line
"D04parameter.ztst: starting."
but no line
"D04parameter.ztst: failed (or all tests successful)."

# Yes, the directory Test/parameter.tmp is not removed
# and we can guess from this, but ...

With the patch below runtest.zsh writes the name of
crashed script(s) with the signal name.


diff --git a/Test/runtests.zsh b/Test/runtests.zsh
index b66d579b6..538663f50 100644
--- a/Test/runtests.zsh
+++ b/Test/runtests.zsh
@@ -15,6 +15,7 @@ for file in "${(f)ZTST_testlist}"; do
     (( skipped++ ))
   elif (( $retval )); then
     (( failure++ ))
+    (( $retval > 128 )) && print "$file: failed: SIG$signals[$retval - 127]."
   else
     (( success++ ))
   fi





                 reply	other threads:[~2024-02-28 16:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=720C3DB0-489C-419D-8E54-D9428BC7F5C3@kba.biglobe.ne.jp \
    --to=takimoto-j@kba.biglobe.ne.jp \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).