On 10/13/05, James E Keenan <[EMAIL PROTECTED]> wrote: > David Landgren wrote: > > Fergal Daly wrote: > > > >> http://www.nntp.perl.org/group/perl.cpan.testers/257538 > >> > >> shows a fail for Test-Benchmark but the fail seems to be caused by > >> CPANPLUS not installing dependencies: > > > > > > Apparently it's a bug in CPANPLUS that stops it from keeping track of > > grand children dependencies. @INC winds up only containing the first > > level of prerequisites. > > Without disputing the accuracy of that bug report for CPANPLUS > (https://rt.cpan.org/NoAuth/Bug.html?id=14760), I doubt that's the > problem here. > > Test-Benchmark-0.04/Makefile.PL includes this code: > > PREREQ_PM => { > Benchmark => 1, > 'Test::Builder' => 0, > 'Test::Tester' => 0.103, > 'Test::NoWarnings' => 0, > }, > > Benchmark and Test::Builder are core, so there are no missing > dependencies there. AFAICT, Test-Tester-0.103 and the latest version of > Test::NoWarnings do not 'use' or 'require' any non-core modules other > than the superclasses included in their distributions. So I don't think > that multiple levels of prerequisites can be the source of this problem. > > Another reason why I don't think it's a CPANPLUS problem is that I > encountered the same bug as did cpan.tester imacat in the report F > cited, namely, that "# Looks like you planned 36 tests but only ran 29." > But I got that FAIL not by using CPANPLUS but by downloading the > module with LWP::Simple::getstore, then manually trying to build the > module with tar and make. As I reported off-list to Fergal, I had an > older version of Test::Tester (0.07) installed on my box. > Test-Benchmark-0.04/Makefile.PL should have forced me to upgrade, just > as it should have forced the cpan tester to upgrade. But it didn't, for > reasons unknown. > > When, however, I manually upgraded to Test-Tester-0.103, I re-ran 'make > test' for Test-Benchmark-0.04 and all tests passed. I've diffed v0.07 > and v0.103 of Test-Tester, but nothing leaps out and says "I'm what's > missing from the older version." I'm also puzzled by the fact that the > block of tests which are failing in Test-Benchmark-0.04/t/test.t, > > check_test( > sub { > is_faster(-1, 2, $fac10, $fac30, "30 2 times faster than 10"); > }, > { > actual_ok => 0, > }, > "30 2 times than 10" > ); > > ... doesn't look materially different from the preceding block of tests: > > check_tests( > sub { > is_faster(-1, $fac20, $fac10, "20 faster than 10 time"); > is_faster(1000, $fac20, $fac10, "20 faster than 10 num"); > }, > [ > { > actual_ok => 0, > }, > { > actual_ok => 0, > }, > ], > "20 slower than 10" > ); > > > So, while I know that getting the latest version of Test-Tester clears > up the problem with Test-Benchmark-0.04, I'm stumped as to why > Test-Benchmark's Makefile.PL didn't force me to upgrade to > Test-Tester-0.103. And I'm stumped as to why the last block of tests > fails when very similar blocks pass.
To clarify, there are 2 problems. 1 the plan is out of whack. This is expected, I updated Test::Tester so that it tests more things and as a result I updated all the modules that depend on it. I also updated the PREREQs of those modules to require the latest Test::Tester 2 the last test is failing. I'm not sure why but the nature of Test::Benchmark is that things can fail occasionally because benchmarks are not reliable, in fact the test that seems to be failing is one that compares running factorial of 30 against factorial of 10 and expects them to differ by a factor of 2. This might be a bad test. If (on your machine) it works consistently with 0.103 and fails consitently with earlier version then that's puzzling but I can't reproduce it. The Makefile.PL won't force you to upgrade, it should warn you that you have the wrong version and CPANPLUS should then ensure that the correct one is installed before continuing. I tried it yesterday with plain old CPAN.pm and it correctly fetched the latest version. A bug has been filed, F