Control: severity -1 important Control: tag -1 + patch wontfix upstream Hi Bastien,
Bastien ROUCARIÈS wrote: > Sid version FTBFS whereas testing work fine see > https://jenkins.debian.net/job/lintian-tests_sid/ I fixed that one last night in the Lintian test suite (without having noticed this bug report). Took me and a few helpers (including Lucas Kanashiro) hours and a lots of trial and error runs. I'm actually not sure if the bug is really in Test::Perl::Critic. We actually four options where the bug could be: * lintian: Lintian test suite: In case subtest() is not meant to be used that way. I fixed it there by no more using subtest(), probably for the price of less chatty error messages in case of failures: https://anonscm.debian.org/cgit/lintian/lintian.git/commit/?id=a5baafce * libtest-simple-perl: Test::More's subtest, because it doesn't seem to be thread-safe. * libmce-perl: MCE::Grep's mce_grep seems to have no option to enforce the using of plain grep upon request. * libtest-perl-critic-perl, because Test::Perl::Critic uses mce_grep unconditionally (replacing it with plain grep solves the issue, too.) and it's fiddling with Test::Builder's internals ignores $builder->{Test_Results} which is used by subtest. So a working and tested patch is the following: diff --git a/lib/Test/Perl/Critic.pm b/lib/Test/Perl/Critic.pm index 2fdf32b..021e0f7 100644 --- a/lib/Test/Perl/Critic.pm +++ b/lib/Test/Perl/Critic.pm @@ -101,7 +101,7 @@ sub all_critic_ok { # workers. So we disable the T::B sanity checks at the end of its life. $TEST->no_ending(1); - my $okays = mce_grep { critic_ok($_) } @files; + my $okays = grep { critic_ok($_) } @files; my $pass = $okays == @files; # To make Test::Harness happy, we must emit a test plan and a sensible exit I was tempted to apply that patch and upload it (see #debian-qa from last night), but this removes _all_ gain which was added by using MCE::Grep, so that's likely not the right solution. I've tagged it "wontfix" for now, as this is something upstream must fix -- if it is a bug in Test::Perl::Critic at all. Regards, Axel -- ,''`. | Axel Beckert <a...@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 `- | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE