Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-Id: <200507191245.j6JCjAcS080629@crag.niss.com> From: Scott Bolte To: Michael G Schwern cc: "Gerrit P. Haase" , Andrew Ho , cygwin AT cygwin DOT com, makemaker AT perl DOT org, perl5-porters AT perl DOT org, petdance AT cpan DOT org Subject: Re: [perl-5.8.7] Perl regression tests fail when lib directory is present MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <80627 DOT 1121777110 DOT 1 AT crag DOT niss DOT com> Date: Tue, 19 Jul 2005 07:45:10 -0500 X-IsSubscribed: yes On Mon, 18 Jul 2005 01:50:33 -0700, Michael G Schwern wrote: > > MakeMaker is not involved, just Test::Harness. All the action is in or > called from Test::Harness::Straps->analyze_file. I agree. TH is resetting INC and the directories passed into test_harness() are lost after the first invocation. The simple test script below, when tested twice, fails on the second call. As you'll see, blib/lib is not in INC. _____ t/foo.t / #!/usr/bin/perl -w | use strict; | use Test::More qw(no_plan); | | use_ok('Device::Profile::Document'); | printf("INC:\t%s\n", join("\n\t", @INC)); If you prepend the perl or (make test) command with (env PERL5LIB=blib/lib) the tests will work. % perl -MExtUtils::Command::MM -e 'test_harness(1, "blib/lib")' t/foo.t t/foo.t t/foo....ok 1 - use Device::Profile::Document; INC: /home/scott/Projects/MDS2/Device-Profile/blib/lib /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 . 1..1 ok t/foo.... # Failed test (t/foo.t at line 5) # Tried to use 'Device::Profile::Document'. # Error: Can't locate Device/Profile/Document.pm in @INC (@INC contains: /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .) at (eval 3) line 2. # BEGIN failed--compilation aborted at t/foo.t line 5. # Looks like you failed 1 test of 1. not ok 1 - use Device::Profile::Document; INC: /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 . 1..1 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/foo.t 1 256 1 1 100.00% 1 Failed 1/2 test scripts, 50.00% okay. 1/2 subtests failed, 50.00% okay. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/