]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
tap: include malformed output in error message to aid with debugging
authorRichard Hansen <rhansen@rhansen.org>
Mon, 3 Feb 2025 23:26:58 +0000 (18:26 -0500)
committerKarl Berry <karl@freefriends.org>
Sun, 23 Feb 2025 01:36:59 +0000 (17:36 -0800)
* lib/tap-driver.sh: If the line that should contain the test script's exit
status is not an integer (which would indicate a bug with the driver, not the
code under test), include the line in the error message to help with
debugging.

lib/tap-driver.sh

index d36ff7a00e087c1b275b298d5031cc5d6048e2e8..a71c5eeb95ebc505ca8a66853e93f506f0f26dba 100755 (executable)
@@ -23,7 +23,7 @@
 # bugs to <bug-automake@gnu.org> or send patches to
 # <automake-patches@gnu.org>.
 
-scriptversion=2025-02-03.03; # UTC
+scriptversion=2025-02-03.04; # UTC
 
 # Make unconditional expansion of undefined variables an error.  This
 # helps a lot in preventing typo-related bugs.
@@ -544,7 +544,7 @@ function get_test_exit_message(status)
   if (status == 0)
     return ""
   if (status !~ /^[1-9][0-9]*$/)
-    abort("getting exit status")
+    abort("getting exit status: not an integer: " status)
   if (status < 127)
     exit_details = ""
   else if (status == 127)