Trouble running test scripts with ExtUtils::MakeMaker

Discussion in 'Perl Misc' started by wisnij@gmail.com, Mar 2, 2006.

  1. Guest

    A few days ago I wrote a Perl module and put it into a directory
    structure created with h2xs in order to do unit testing. My very
    earliest tests were failing unexpectedly, so I pared the testing
    scripts down to the very bare minimum to see if I could find the
    problem. There were eventually just two files, t/00foo.t and
    t/01bar.t, both with exactly the same two-line content:

    use Test::More tests => 1;
    BEGIN { use_ok 'My::Module' };

    Running "make test" (perl 5.8.7 on Cygwin), this was the output modulo
    some line wrapping:

    /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,
    'blib/lib', 'blib/arch')" t/*.t
    t/00foo....ok
    t/01bar....
    # Failed test 'use My::Module;'
    t/01bar....NOK 1# in t/01bar.t at line 2.
    # Tried to use 'My::Module'.
    # Error: Can't locate My/Module.pm in @INC (@INC contains:
    /usr/lib/perl5/5.8/cygwin [etc...] /usr/lib/perl5/vendor_perl/5.8 .) at
    (eval 3) line 2.
    # BEGIN failed--compilation aborted at t/01bar.t line 2.
    # Looks like you failed 1 test of 1.
    t/01bar....dubious
    Test returned status 1 (wstat 256, 0x100)
    DIED. FAILED test 1
    Failed 1/1 tests, 0.00% okay
    Failed Test Stat Wstat Total Fail Failed List of Failed
    -----------------------------------------------------------------
    t/01bar.t 1 256 1 1 100.00% 1
    Failed 1/2 test scripts, 50.00% okay. 1/2 subtests failed, 50.00%
    okay.
    make: *** [test_dynamic] Error 14

    How could this possibly happen? I tried it out with more copies of the
    same testing file, and the output followed the same pattern: the
    scripts would alternate between succeeding and totally failing to find
    the module. The only thing I can think of is that I've somehow gotten
    a buggy copy of Test::Harness or some other module, and it's failing
    pass on the existence of blib/lib and so forth to every other test
    script for some reason; it's clearly not in @INC when 01bar.t is run,
    even though it certainly should be.

    Has anybody ever seen something like this? I've written a few modules
    before, but I've never seen anything fail like this.

    -- J.
     
    , Mar 2, 2006
    #1
    1. Advertising

  2. Sisyphus Guest

    <>
    ..
    ..
    > the
    > scripts would alternate between succeeding and totally failing to find
    > the module.

    ..
    ..
    >
    > Has anybody ever seen something like this? I've written a few modules
    > before, but I've never seen anything fail like this.
    >


    I've seen posts about this on the MakeMaker list a few months back. Not sure
    of the details as I don't have cygwin and didn't take much interest in it.
    See:
    http://www.mail-archive.com//msg02084.html

    I think the whole thread is available from that page - otherwise you can
    access that thread from:
    http://www.mail-archive.com//thrd2.html

    Cheers,
    Rob
     
    Sisyphus, Mar 2, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jill
    Replies:
    2
    Views:
    133
    James Willmore
    Jan 27, 2004
  2. felipe200112
    Replies:
    0
    Views:
    258
    felipe200112
    Apr 19, 2004
  3. Irving Kimura

    Anything better than ExtUtils::MakeMaker ?

    Irving Kimura, May 11, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    117
    Jon Ericson
    May 14, 2004
  4. Abdul-Wahid Paterson

    installing extra file through ExtUtils::MakeMaker

    Abdul-Wahid Paterson, Nov 8, 2004, in forum: Perl Misc
    Replies:
    1
    Views:
    180
    Anno Siegel
    Nov 9, 2004
  5. kj
    Replies:
    2
    Views:
    95
Loading...

Share This Page