zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] runtests.zsh: output name of crashed test script
@ 2024-02-28 16:32 Jun. T
  0 siblings, 0 replies; only message in thread
From: Jun. T @ 2024-02-28 16:32 UTC (permalink / raw)
  To: zsh-workers

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





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-02-28 16:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-28 16:32 [PATCH] runtests.zsh: output name of crashed test script Jun. T

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).