wvtestrunner would notice if the subprogram returned a non-zero exit code,
but not if it died on a signal. Thus, a unit test program dying on a
segfault was considered a success. Oops!
(cherry picked from commit
9aff60fa6d55a46440a8e4d6bf343753b2bdc1ec)
my $code = $?;
my $ret = ($code >> 8);
+# return death-from-signal exits as >128. This is what bash does if you ran
+# the program directly.
+if ($code && !$ret) { $ret = $code | 128; }
+
if ($ret && @log) {
print "\n" . join("\n", @log) . "\n";
}
+if ($code != 0) {
+ print resultline("Program returned non-zero exit code ($ret)", "FAILED");
+}
my $gtotal = $gpasses+$gfails;
printf("\nWvTest: %d test%s, %d failure%s.\n",