Subject: | tests in subdirs do not find modules in blib |
wxPerl, Win32&Linux, perl@15632
the module structure is
wxPerl/Makefile.PL
wxPerl/ext/grid/Makefile.PL
wxPerl/wxt/html/Makefile.PL
...
at build time all .pm an .so/.dll are put
in the toplevel blib ( BTW this requires a small
tweak in constants(), because MM's INST_*
are always ../blib even if the submakefile
is in a two level deep directory ).
make test for subdirectories fails because
@INC does not contains ../../blib/* ( it contains
blib/*, even if the subdir does not conatin
a blib ). Adding -Mblib to the line starting the
harness solves the problem.
mbarbon@tweddledee:~/wx/b/gtk/P58cvs-2.3-d$ make test
make[1]: Entering directory `/home/mbarbon/wx/b/gtk/P58cvs-2.3-d/ext/grid'
<snip>
make[1]: Leaving directory `/home/mbarbon/wx/b/gtk/P58cvs-2.3-d/ext/print'
PERL_DL_NONLAZY=1 /home/mbarbon/p5.8/bin/perl "-MExtUtils::testlib" "-MExtUtils::Command::MM" "-e" "test_harness(0)" t/*.t
t/1_load...........ok
t/2_inheritance....ok
t/3_event..........ok
t/4_userdata.......ok
All tests successful.
Files=4, Tests=143, 15 wallclock secs (12.44 cusr + 0.47 csys = 12.91 CPU)
make[1]: Entering directory `/home/mbarbon/wx/b/gtk/P58cvs-2.3-d/ext/grid'
PERL_DL_NONLAZY=1 /home/mbarbon/p5.8/bin/perl "-MExtUtils::testlib" "-MExtUtils::Command::MM" "-e" "test_harness(0)" t/*.t
t/1_load...........Can't locate Wx.pm in @INC (@INC contains: /home/mbarbon/wx/b/gtk/P58cvs-2.3-d/ext/grid/blib/arch /home/mbarbon/w
x/b/gtk/P58cvs-2.3-d/ext/grid/blib/lib /home/mbarbon/p5.8/lib/perl5/5.7.3/i586-linux /home/mbarbon/p5.8/lib/perl5/5.7.3 /home/mbarbo
n/p5.8/lib/perl5/site_perl/5.7.3/i586-linux /home/mbarbon/p5.8/lib/perl5/site_perl/5.7.3 /home/mbarbon/p5.8/lib/perl5/site_perl/5.7.
3 /home/mbarbon/p5.8/lib/perl5/site_perl . /home/mbarbon/p5.8/lib/perl5/5.7.3/i586-linux /home/mbarbon/p5.8/lib/perl5/5.7.3 /home/mb
arbon/p5.8/lib/perl5/site_perl/5.7.3/i586-linux /home/mbarbon/p5.8/lib/perl5/site_perl/5.7.3 /home/mbarbon/p5.8/lib/perl5/site_perl
.) at t/1_load.t line 6.
BEGIN failed--compilation aborted at t/1_load.t line 6.
t/1_load...........dubious
Test returned status 2 (wstat 512, 0x200)
BTW: great work! apart from that, everything
else works nicely, even is wxPerl's build
system plays Dirty Tricks against MM. I thought I
would have to make some substantial fixes for the new MM.
Regards
Mattia