# New Ticket Created by  Nicholas Clark 
# Please include the string:  [perl #126195]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org/Ticket/Display.html?id=126195 >


commit f3476903e466c047 added 'trap' to the list of arguments that t/harness 
invokes TAP::Harness with.

'trap' is fatal for older TAP::Harness versions, and hence causes t/harness and 
thus the tests to abort.

Patch attached that makes it conditional.
>From c683753b06a08ab32e051dcaaa79c62dc9abe5b9 Mon Sep 17 00:00:00 2001
From: Nicholas Clark <n...@ccl4.org>
Date: Sat, 26 Sep 2015 10:11:42 +0200
Subject: [PATCH] Only enable 'trap' for new enough harnesses.

The 'trap' option was added to TAP::Harness version 3.22. Attempting to set it
on earlier versions is a fatal error, and aborts testing. Hence pass
argument conditionally, based on $TAP::Harness::VERSION.
---
 t/harness | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/harness b/t/harness
index 2573e18..8a3337b 100644
--- a/t/harness
+++ b/t/harness
@@ -124,7 +124,7 @@ if (eval "require $tap_harness_class;") {
         jobs        => $jobs,
         ignore_exit => 1,
         merge       => 1,
-        trap        => 1,
+        $TAP::Harness::VERSION > 3.21 ? (trap => 1) : (),
         $archive ? ( archive => $archive ) : (),
         $extra_properties ? ( extra_properties => $extra_properties ) : (),
     );
-- 
2.2.0-369-g3b010e3

Reply via email to