Subject: | DIE handler in testlib.pl doesn't ignore dies inside evals |
There have been lots of test failures on Win32. This is mainly because
the call to fork() in t/testlib.pl actually does an eval {} internally
and triggers an exception within the eval call. But t/testlib.pl
includes a __DIE__ signal handler that doesn't ignore dies that come
from within an eval call, so the normally harmless eval {} test within
fork kills the test.
One way you can prevent this is to check if $^S is true in the __DIE__
handler, which means the call cam from within an eval. A possible
solution that fixes the issue on Win32 is attached.
Subject: | 0001-Ignore-dies-from-within-evals-in-tests.patch |
From 9251d81b872cc591363f5dcaa1edc6614c7c6443 Mon Sep 17 00:00:00 2001
From: Douglas Christopher Wilson <doug@somethingdoug.com>
Date: Thu, 29 Mar 2012 15:09:36 -0400
Subject: [PATCH] Ignore dies from within evals in tests.
---
t/testlib.pl | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/t/testlib.pl b/t/testlib.pl
index 7933682..8459a16 100644
--- a/t/testlib.pl
+++ b/t/testlib.pl
@@ -31,6 +31,7 @@ if ( ! defined &ok ) {
}
$SIG{ __DIE__ } = sub {
+ return if $^S; # Ignore from within evals
ok( 0,"@_" );
killall();
exit(1);
--
1.7.6.msysgit.0