develooper Front page | perl.perl5.porters | Postings from July 2009

make test (lib/CGI/t/fast.t) using modules outside the builddirectory?

Thread Next
From:
Bram
Date:
July 25, 2009 14:21
Subject:
make test (lib/CGI/t/fast.t) using modules outside the builddirectory?
Message ID:
20090725232118.xatz73qfj4g8o0ok@horde.wizbit.be
There is a problem with lib/CGI/t/fast.t:

It currently checks if the tests should be run by testing if the FCGI   
module can be loaded.

This can results in failing tests:

http://www.nntp.perl.org/group/perl.perl5.porters/2009/07/msg148535.html


What happened in that smoke:

Tux's system has perl-5.10.0 installed and has the FCGI module installed.
The @INC for the system perl-5.10.0 and the maint-5.10 perl are the same.

When maint-5.10 is being smoked it attempts to load FCGI. This  
succeeds because it is installed in the main perl (but it is not  
available in the perl that is being tested).

The 'solution' for the smoke was to bump the version in maint-5.10 to  
5.10.1 which results in a different @INC which should avoid the problem.

But I'm not convinced that is a good solution since the issue will  
reappear when the main perl on the system is perl-5.10.1 and FCGI is  
installed and maint-5.10 is being smoked.

For the smokes a work around is possible (that is, add -Dprefix=...)  
but I'm not convinced with that solution either.

The reason: when someone wants (for whatever reason) install  
maint-5.10 on a system that currently has the latest 5.10.x and FCGI  
then the same test will/might fail (since the @INC is the same).


The solutions I can see:

- somehow remove the path were perl will be installed from @INC when  
running make test/make test_harness (no clue how tho)
- modify @INC in the test when $ENV{'PERL_CORE'} is true
- skip the test when $ENV{'PERL_CORE'} is true
- ...?


(This also makes me wonder about another thing: what other modules and  
files are being loaded during make test when they shouldn't?)


Any thoughts?


Best regards,

Bram




Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About