Skip Menu |

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

Report information
The Basics
Id: 19505
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: Nobody in particular
Requestors: jdhedden [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 2.58
  • 2.60
Fixed in: (no value)



Subject: 'make test' returns 'true' if tests fail
With Test::Harness 2.56, if a test fails, then 'make test' returns false back to the shell. I rely on this feature to keep bad modules from being installed, and for reporting test results. With 2.58 and 2.60, if a test fails, 'make test' now returns true.
On Fri May 26 09:19:06 2006, JDHEDDEN wrote: Show quoted text
> With Test::Harness 2.56, if a test fails, then 'make test' returns false > back to the shell. I rely on this feature to keep bad modules from > being installed, and for reporting test results. > > With 2.58 and 2.60, if a test fails, 'make test' now returns true.
This appears to be related to bug #17490: http://rt.cpan.org/Ticket/Display.html?id=17490
On Fri May 26 09:19:06 2006, JDHEDDEN wrote: Show quoted text
> With Test::Harness 2.56, if a test fails, then 'make test' returns false > back to the shell. I rely on this feature to keep bad modules from > being installed, and for reporting test results. > > With 2.58 and 2.60, if a test fails, 'make test' now returns true.
The attached patch restores the documented behavior.
--- lib/Test/Harness.pm.orig 2006-05-26 11:19:52.000000000 -0400 +++ lib/Test/Harness.pm 2006-05-26 11:47:50.000000000 -0400 @@ -214,6 +214,11 @@ assert(($ok xor keys %$failedtests), q{ok status jives with $failedtests}); + if (! $ok) { + die("Failed $tot->{bad}/$tot->{tests} test scripts. " . + "@{[$tot->{max} - $tot->{ok}]}/$tot->{max} subtests failed.\n"); + } + return $ok; }
Thank you for the patch. I just want to reiterate the importance of this bug. CPANPLUS relies on the die in order to determine when NOT to install a broken module. Without this patch, CPANPLUS is installing ALL modules even if they fail tests. -- - - Martin 'Kingpin' Thurn
Fixed in 2.62. I'm sorry this got past me for so long. :-(