Skip Menu |

This queue is for tickets about the TAP-Harness-JUnit CPAN distribution.

Report information
The Basics
Id: 66256
Status: resolved
Priority: 0/
Queue: TAP-Harness-JUnit

People
Owner: JLAVALLEE [...] cpan.org
Requestors: shahzad_naeem [...] blueyonder.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Version 0.34 of TAP::Harness::JUnit.pm
Date: Mon, 28 Feb 2011 16:15:12 +0000
To: bug-TAP-Harness-JUnit [...] rt.cpan.org
From: Shahzad Naeem <shahzad_naeem [...] blueyonder.co.uk>
Hello, There seems to be a bug in the feature that ignores the exit status of test scripts. Specifically, on line 301 of JUnit.pm it looks like the code to ignore a non-zero test exit status if the test script has errors has been commented out. The code looks right, but maybe it causes issues with existing test suites? For me uncommenting the line and commenting the original works fine. Hope this helps. Regards, Shahzad Naeem
Are you suggesting the following change? --- a/lib/TAP/Harness/JUnit.pm +++ b/lib/TAP/Harness/JUnit.pm @@ -298,8 +298,8 @@ sub parsetest { } # Bad return value. See BUGS - #elsif ($badretval and not $xml->{errors}) { - elsif ($badretval) { + elsif ($badretval and not $xml->{errors}) { + #elsif ($badretval) { # Fake a failed test push @{$xml->{testcase}}, { 'time' => 0,
Subject: Re: [rt.cpan.org #66256] Version 0.34 of TAP::Harness::JUnit.pm
Date: Wed, 02 Mar 2011 09:12:08 +0000
To: bug-TAP-Harness-JUnit [...] rt.cpan.org
From: Shahzad Naeem <shahzad_naeem [...] blueyonder.co.uk>
Hi, Yes that change works for me. It looks like somebody (possibly you?) already had considered it. Alternatively, an new option could be added to make the code selective and keep the original behaviour the default. Something like 'noscripterrorcountfail' which defaults to 0 elsif ( $badretval and ( ( not $noscripterrorcountfail ) ) or ( $noscripterrorcountfail and not $xml->{errors} ) ) ) { ... I am happy with either, but I suppose the second method keeps everything backwards compatible and is probably better. Regards, Shahzad Naeem On 02/03/2011 01:07, Jeff Lavallee via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=66256> > > Are you suggesting the following change? > > --- a/lib/TAP/Harness/JUnit.pm > +++ b/lib/TAP/Harness/JUnit.pm > @@ -298,8 +298,8 @@ sub parsetest { > } > > # Bad return value. See BUGS > - #elsif ($badretval and not $xml->{errors}) { > - elsif ($badretval) { > + elsif ($badretval and not $xml->{errors}) { > + #elsif ($badretval) { > # Fake a failed test > push @{$xml->{testcase}}, { > 'time' => 0, > >
Subject: Re: [rt.cpan.org #66256] Version 0.34 of TAP::Harness::JUnit.pm
Date: Wed, 02 Mar 2011 20:26:10 +0000
To: bug-TAP-Harness-JUnit [...] rt.cpan.org
From: Shahzad Naeem <shahzad_naeem [...] blueyonder.co.uk>
Hi, I've done a bit more digging, I do not have the problem on my Fedora 12 server. On investigating, it has version 0.32-3.fc12 and it seems that the original code is as described by the change below. Any idea why the code was changed ? Regards, Shahzad Naeem On 02/03/2011 01:07, Jeff Lavallee via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=66256> > > Are you suggesting the following change? > > --- a/lib/TAP/Harness/JUnit.pm > +++ b/lib/TAP/Harness/JUnit.pm > @@ -298,8 +298,8 @@ sub parsetest { > } > > # Bad return value. See BUGS > - #elsif ($badretval and not $xml->{errors}) { > - elsif ($badretval) { > + elsif ($badretval and not $xml->{errors}) { > + #elsif ($badretval) { > # Fake a failed test > push @{$xml->{testcase}}, { > 'time' => 0, > >
I suspect the change was part of one of the patches applied from the RT queue for the 0.33 release, but I haven't identified which one yet. I hope to look into it today or tomorrow. On Wed Mar 02 15:26:43 2011, shahzad_naeem@blueyonder.co.uk wrote: Show quoted text
> Hi, > > I've done a bit more digging, I do not have the problem on my Fedora 12 > server. > > On investigating, it has version 0.32-3.fc12 and it seems that the > original code is > as described by the change below. > > Any idea why the code was changed ? > > Regards, > > Shahzad Naeem > > On 02/03/2011 01:07, Jeff Lavallee via RT wrote:
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=66256> > > > > Are you suggesting the following change? > > > > --- a/lib/TAP/Harness/JUnit.pm > > +++ b/lib/TAP/Harness/JUnit.pm > > @@ -298,8 +298,8 @@ sub parsetest { > > } > > > > # Bad return value. See BUGS > > - #elsif ($badretval and not $xml->{errors}) { > > - elsif ($badretval) { > > + elsif ($badretval and not $xml->{errors}) { > > + #elsif ($badretval) { > > # Fake a failed test > > push @{$xml->{testcase}}, { > > 'time' => 0, > > > >
> >
It looks like this change was part of the patch for RT 56521. In any case, I've reverted that particular line and released v0.35 to CPAN. Please let me know if it fixes your issue. Thanks!
Subject: Re: [rt.cpan.org #66256] Version 0.34 of TAP::Harness::JUnit.pm
Date: Thu, 03 Mar 2011 09:58:08 +0000
To: bug-TAP-Harness-JUnit [...] rt.cpan.org
From: Shahzad Naeem <shahzad_naeem [...] blueyonder.co.uk>
Thanks, I will install v0.35 and let you know. Shahzad On 03/03/2011 05:13, Jeff Lavallee via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=66256> > > It looks like this change was part of the patch for RT 56521. In any case, I've reverted that > particular line and released v0.35 to CPAN. Please let me know if it fixes your issue. > > Thanks! >
Subject: Re: [rt.cpan.org #66256] Version 0.34 of TAP::Harness::JUnit.pm
Date: Thu, 03 Mar 2011 14:17:05 +0000
To: bug-TAP-Harness-JUnit [...] rt.cpan.org
From: Shahzad Naeem <shahzad_naeem [...] blueyonder.co.uk>
Hi, I've used v0.35 and it seems to be fine. Ok to close the bug. Regards, Shahzad Naeem On 03/03/2011 05:13, Jeff Lavallee via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=66256> > > It looks like this change was part of the patch for RT 56521. In any case, I've reverted that > particular line and released v0.35 to CPAN. Please let me know if it fixes your issue. > > Thanks! >