Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'trap' argument is fatal for older TAP::Harness #4593

Closed
p6rt opened this issue Sep 26, 2015 · 4 comments
Closed

'trap' argument is fatal for older TAP::Harness #4593

p6rt opened this issue Sep 26, 2015 · 4 comments

Comments

@p6rt
Copy link

p6rt commented Sep 26, 2015

Migrated from rt.perl.org#126195 (status was 'resolved')

Searchable as RT126195$

@p6rt
Copy link
Author

p6rt commented Sep 26, 2015

From @nwc10

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.

@p6rt
Copy link
Author

p6rt commented Sep 26, 2015

From @nwc10

0001-Only-enable-trap-for-new-enough-harnesses.patch
From c683753b06a08ab32e051dcaaa79c62dc9abe5b9 Mon Sep 17 00:00:00 2001
From: Nicholas Clark <nick@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

@p6rt
Copy link
Author

p6rt commented Sep 27, 2015

From @moritz

On Sat Sep 26 01​:18​:00 2015, nicholas wrote​:

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.

Patch applied. Thanks!

Cheers,
Moritz

@p6rt p6rt closed this as completed Sep 27, 2015
@p6rt
Copy link
Author

p6rt commented Sep 27, 2015

@moritz - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant