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