Subject: | tests assume $Config{installarch} where installsitearch is valid |
Installing rpm-build-perl 0.6.1 (scroll to bottom for platform details),
'make test' fails, preventing installation with CPAN.
I get the following output from 'make test':
+++
root@kubuntu:~/.cpan/build/rpm-build-perl-0.6.1# make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-B-PerlReq....ok
t/02-perlreq......ok
t/03-perlprov.....NOK 28/0
# Failed test '/usr/lib/perl/5.8/Cwd.pm exists'
# at t/03-perlprov.t line 30.
perl.prov: /usr/lib/perl/5.8/Cwd.pm: No such file or directory
t/03-perlprov.....NOK 29/0
# Failed test '/usr/lib/perl/5.8/Cwd.pm dependencies'
# at t/03-perlprov.t line 32.
# ''
# doesn't match '(?-xism:^perl\(Cwd\.pm\)\ \=\ (\d|$))'
t/03-perlprov.....NOK 30/0
# Failed test '/usr/lib/perl/5.8/Cwd.pm zero exit status'
# at t/03-perlprov.t line 33.
# Looks like you failed 3 tests of 45.
t/03-perlprov.....dubious
Test returned status 3 (wstat 768, 0x300)
DIED. FAILED tests 28-30
Failed 3/45 tests, 93.33% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/03-perlprov.t 3 768 45 3 28-30
Failed 1/3 test scripts. 3/138 subtests failed.
Files=3, Tests=138, 6 wallclock secs ( 4.64 cusr + 0.59 csys = 5.23 CPU)
Failed 1/3 test programs. 3/138 subtests failed.
make: *** [test_dynamic] Error 3
+++
It appears t/03-perlprov.t assumes on lines 36 and 48 (quoted below)
that Cwd.pm will always be installed in $Config{installarchlib}
(/usr/lib/perl/5.8 on my system), when it could be in
$Config{installsitearch} (/usr/local/lib/perl/5.8.8).
From t/03-perlprov.t (line numbers added):
36 my ($lib, $arch) = @Config{qw{installprivlib installarchlib}};
48 Provides "$arch/Cwd.pm" => "perl(Cwd.pm) = ";
The workaround is to manually run 'make install' in the rpm-build-perl
build directory, or perhaps force PathTools to install Cwd.pm in the
installarchlib directory.
A fix will require reworking t/03-perlprov.t to also test the alternate
directory.
***
platform details:
perl v5.8.8 built for i486-linux-gnu-thread-multi
Linux myhost 2.6.17-11-generic #2 SMP Thu Feb 1 19:52:28 UTC 2007 i686
GNU/Linux