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.

jimk

Reply via email to