]> The Tcpdump Group git mirrors - tcpdump/commitdiff
tests/TESTonce: More verbose failure message
authorUlrich Windl <[email protected]>
Tue, 12 Sep 2017 15:08:46 +0000 (17:08 +0200)
committerFrancois-Xavier Le Bail <[email protected]>
Sun, 1 Jul 2018 15:10:51 +0000 (17:10 +0200)
Add the reason for not executing a test and the status if the command
exited with a non-zero status.

(cherry picked from commit 071190f7a96d273fe79dc6f3ca12153d8db1de00)

tests/TESTonce

index 7026624bfe6919604e8ec758b77dde5b9dfa4a4b..3be31f9aebcdda0299e5066e97a345f2dcfc1d73 100755 (executable)
@@ -40,7 +40,7 @@ if($r == 0) {
   unlink "DIFF/$output.diff";
   exit 0;
 }
-printf "    %-35s: TEST FAILED", $name;
+printf "    %-35s: TEST FAILED(%s)", $name, $r == -1 ? $! : "exit $?";
 open FOUT, '>>failure-outputs.txt';
 printf FOUT "Failed test: $name\n\n";
 close FOUT;