Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 22685
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: cpan [...] clotho.com
Cc:
AdminCc:

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



Subject: Test failure erroneously not detected
I tried installing Statistics::Lite. The tests failed, but CPANPLUS installed it anyway. A snippet of output: ok 17 ok 18 not ok 19 # Test 19 got: "0.666666666666667" (test.pl at line 49) # Expected: "1" # test.pl line 49 is: ok($stats{variance},1); not ok 20 # Test 20 got: "0.816496580927726" (test.pl at line 50) # Expected: "1" # test.pl line 50 is: ok($stats{stddev},1); [MSG] MAKE TEST passed: Running [/usr/bin/make install ]... CPAN.pm correctly detects the test failure. I am a longtime user of CPANPLUS, so I'm fairly confident that this is not user error (I did not specify 'force' for example). The module in question uses Test.pm, which is v1.25 on my system. This is Perl 5.8.6 on MacOSX 10.4.
Show quoted text
> I tried installing Statistics::Lite. The tests failed, but CPANPLUS > installed it anyway. A snippet of output:
[...] The reason it's installed anyway, is that the make test doesn't 'fail': [kane@rimmer ~...build/Statistics-Lite-2.0]$ make test PERL_DL_NONLAZY=1 /opt/bin/perl "-Iblib/lib" "-Iblib/arch" test.pl [...] not ok 20 # Test 20 got: "0.816496580927726" (test.pl at line 50) # Expected: "1" # test.pl line 50 is: ok($stats{stddev},1); [kane@rimmer ~...build/Statistics-Lite-2.0]$ echo $? 0 What's supposed to happen is that there's a non-zero exit code, like for example from Devel::Fail::MakeTest: [kane@rimmer ~...build/Devel-Fail-MakeTest-1.005]$ make test [...] Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay. make: *** [test_dynamic] Error 1 [kane@rimmer ~...build/Devel-Fail-MakeTest-1.005]$ echo $? 2 Show quoted text
> CPAN.pm correctly detects the test failure.
It doesn't for me -- and the code CPAN.pm uses to check for failure is identical to that of cpanplus -- the system calls exit code: Show quoted text
cpan> test Statistics::Lite
[...] not ok 20 # Test 20 got: "0.816496580927726" (test.pl at line 50) # Expected: "1" # test.pl line 50 is: ok($stats{stddev},1); /usr/bin/make test -- OK Show quoted text
> I am a longtime user of > CPANPLUS, so I'm fairly confident that this is not user error (I did not > specify 'force' for example). The module in question uses Test.pm, > which is v1.25 on my system.
This is arguably a fault or misfeature of Test.pm -- it doesn't provide a non-zero exit code, so only humans can recognize failures, not machines. I suggest filing a bug against either Test.pm or Statistics::Lite in this case... -- Jos
On Sat Oct 28 17:48:21 2006, CLOTHO wrote: Show quoted text
> CPAN.pm correctly detects the test failure. I am a longtime user of > CPANPLUS, so I'm fairly confident that this is not user error (I did not > specify 'force' for example). The module in question uses Test.pm, > which is v1.25 on my system.
A follow up: I was mistaken when I said that CPAN.pm detects the failure. I've also reported the bug to Statistics::Lite. I now agree that this failure is not CPANPLUS' fault and that this bug should be closed. I also agree that Test.pm's behavior should be corrected or worked around.
On Mon Oct 30 10:00:52 2006, CLOTHO wrote: Show quoted text
> On Sat Oct 28 17:48:21 2006, CLOTHO wrote:
> > CPAN.pm correctly detects the test failure. I am a longtime user of > > CPANPLUS, so I'm fairly confident that this is not user error (I did not > > specify 'force' for example). The module in question uses Test.pm, > > which is v1.25 on my system.
> > A follow up: I was mistaken when I said that CPAN.pm detects the > failure. I've also reported the bug to Statistics::Lite. I now agree > that this failure is not CPANPLUS' fault and that this bug should be > closed. I also agree that Test.pm's behavior should be corrected or > worked around.
Thanks for your reply. I've reported Test.pm's behaviour to the perl-qa list here: http://www.nntp.perl.org/group/perl.qa/7370 In the hope they can address a structural change in Test.pm I'll close this ticket now. -- Jos