Subject: | Test::Dependencies 0.07 - test 02 fails on Win32 |
Hi,
I'm (foolishly?) trying to get Jifty running under Windows. I found that
Test::Dependencies has some Unix-specific assumptions.
See below for description and proposed fix.
Cheers,
k a i
1. THE PROBLEM:
This line in _get_modules_used_in:
my $output = `$perl $taint -MO=PerlReq '$file' 2> /dev/null`;
fails on a Win32 platform.
2. THE PROPOSED PATCH:
This works under Windows, but is not tested on a Unix platform. Using
File::Spec is probably fine, but I'm not sure how to portably invoke
perl in a shell command. Under the Windows command shell, a command-line
parameter has to be between double quotes, not single quotes.
< use File::Spec;
22c21
< Version 0.07_1
---
Show quoted text
> Version 0.07
26c25
< our $VERSION = '0.07_1';
---
Show quoted text> our $VERSION = '0.07';
117,119c116
< my $fs_file = File::Spec->canonpath($file);
< my $fs_devnull = File::Spec->devnull();
< my $output = `$perl $taint -MO=PerlReq "$fs_file" 2> $fs_devnull`;
---
Show quoted text> my $output = `$perl $taint -MO=PerlReq '$file' 2> /dev/null`;
3. THE GORY (AND UNINTERESTING) DETAILS:
This is how it failed under Windows XP (French):
Show quoted textcpan> install Test::Dependencies
Running install for module Test::Dependencies
Running make for Z/ZE/ZEV/Test-Dependencies-0.07.tar.gz
Fetching with LWP:
ftp://cpan.cict.fr/pub/CPAN/authors/id/Z/ZE/ZEV/Test-Dependencies-0.07.tar.gz
WARNING: This key is not certified with a trusted signature!
Primary key fingerprint: 2E66 557A B97C 19C7 91AF 8E20 328D A867 450F 89EC
Signature for C:\Perl\cpan\sources\authors\id\Z\ZE\ZEV\CHECKSUMS ok
Fetching with LWP:
ftp://cpan.cict.fr/pub/CPAN/authors/id/Z/ZE/ZEV/CHECKSUMS
WARNING: This key is not certified with a trusted signature!
Primary key fingerprint: 2E66 557A B97C 19C7 91AF 8E20 328D A867 450F 89EC
Signature for C:\Perl\cpan\sources\authors\id\Z\ZE\ZEV\CHECKSUMS ok
Checksum for
C:\Perl\cpan\sources\authors\id\Z\ZE\ZEV\Test-Dependencies-0.07.tar.gz ok
Test-Dependencies-0.07/
Test-Dependencies-0.07/t/
Test-Dependencies-0.07/t/00-load-basic.t
Test-Dependencies-0.07/t/03-empty.t
Test-Dependencies-0.07/t/02-dependencies.t
Test-Dependencies-0.07/t/boilerplate.t
Test-Dependencies-0.07/t/01-load-with-exclude.t
Test-Dependencies-0.07/t/pod-coverage.t
Test-Dependencies-0.07/t/pod.t
Test-Dependencies-0.07/inc/
Test-Dependencies-0.07/inc/Module/
Test-Dependencies-0.07/inc/Module/Install.pm
Test-Dependencies-0.07/inc/Module/Install/
Test-Dependencies-0.07/inc/Module/Install/AutoInstall.pm
Test-Dependencies-0.07/inc/Module/Install/Fetch.pm
Test-Dependencies-0.07/inc/Module/Install/Makefile.pm
Test-Dependencies-0.07/inc/Module/Install/Include.pm
Test-Dependencies-0.07/inc/Module/Install/Base.pm
Test-Dependencies-0.07/inc/Module/Install/Metadata.pm
Test-Dependencies-0.07/inc/Module/Install/Can.pm
Test-Dependencies-0.07/inc/Module/Install/WriteAll.pm
Test-Dependencies-0.07/inc/Module/Install/Win32.pm
Test-Dependencies-0.07/inc/Module/AutoInstall.pm
Test-Dependencies-0.07/Changes
Test-Dependencies-0.07/MANIFEST
Test-Dependencies-0.07/t-data/
Test-Dependencies-0.07/t-data/empty/
Test-Dependencies-0.07/t-data/empty/dummy
Test-Dependencies-0.07/t-data/mostly-empty/
Test-Dependencies-0.07/t-data/mostly-empty/lib/
Test-Dependencies-0.07/t-data/mostly-empty/lib/empty
Test-Dependencies-0.07/t-data/mostly-empty/META.yml
Test-Dependencies-0.07/META.yml
Test-Dependencies-0.07/lib/
Test-Dependencies-0.07/lib/Test/
Test-Dependencies-0.07/lib/Test/Dependencies.pm
Test-Dependencies-0.07/README
Test-Dependencies-0.07/Makefile.PL
Package came without SIGNATURE
CPAN.pm: Going to build Z/ZE/ZEV/Test-Dependencies-0.07.tar.gz
Set up gcc environment - 3.4.2 (mingw-special)
*** Module::AutoInstall version 1.02
*** Checking for Perl dependencies...
[Core Features]
- Test::Builder::Tester ...loaded. (1.02 >= 0.64)
- B::PerlReq ...loaded. (0.5.2)
- File::Find::Rule ...loaded. (0.280)
- Module::CoreList ...loaded. (2.040)
- PerlReq::Utils ...loaded. (0)
- Test::Builder::Module ...loaded. (0.020)
- YAML ...loaded. (0.620)
*** Module::AutoInstall configuration finished.
Checking if your kit is complete...
Looks good
Writing Makefile for Test::Dependencies
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
cp lib/Test/Dependencies.pm blib\lib\Test\Dependencies.pm
C:\Perl\bin\nmake.EXE -- OK
Running make test
Microsoft (R) Program Maintenance Utility Version 1.50
Copyright (c) Microsoft Corp 1988-94. All rights reserved.
C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0,
'inc', 'blib\lib', 'blib\arch')" t/00-load-basic.t
t/01-load-with-exclude.t t/02-dependencies.t t/03-empty.t
t/boilerplate.t t/pod-coverage.t t/pod.t
t/00-load-basic...........ok
t/01-load-with-exclude....ok
t/02-dependencies.........Le chemin d'accès spécifié est introuvable.
Le chemin d'accès spécifié est introuvable.
Le chemin d'accès spécifié est introuvable.
Le chemin d'accès spécifié est introuvable.
Le chemin d'accès spécifié est introuvable.
Le chemin d'accès spécifié est introuvable.
Le chemin d'accès spécifié est introuvable.
Le chemin d'accès spécifié est introuvable.
# Failed test 'B::PerlReq is not a run-time dependency'
# in t/02-dependencies.t at line 6.
# Failed test 'File::Find::Rule is not a run-time dependency'
# in t/02-dependencies.t at line 6.
# Failed test 'Module::CoreList is not a run-time dependency'
# in t/02-dependencies.t at line 6.
# Failed test 'PerlReq::Utils is not a run-time dependency'
# in t/02-dependencies.t at line 6.
# Failed test 'Test::Builder::Module is not a run-time dependency'
# in t/02-dependencies.t at line 6.
# Failed test 'YAML is not a run-time dependency'
# in t/02-dependencies.t at line 6.
# Failed test 'Test::Builder::Tester is not a build-time dependency'
# in t/02-dependencies.t at line 6.
# Looks like you failed 7 tests of 8.
dubious
Test returned status 7 (wstat 1792, 0x700)
DIED. FAILED tests 2-8
Failed 7/8 tests, 12.50% okay
t/03-empty................Le chemin d'accès spécifié est introuvable.
ok
t/boilerplate.............ok
t/pod-coverage............ok
t/pod.....................ok
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/02-dependencies.t 7 1792 8 7 2-8
Failed 1/7 test scripts. 7/17 subtests failed.
Files=7, Tests=17, 14 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
Failed 1/7 test programs. 7/17 subtests failed.
NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
'0xff'
Stop.
C:\Perl\bin\nmake.EXE test -- NOT OK
Running make install
make test had returned bad status, won't install without force
Failed during this command:
ZEV/Test-Dependencies-0.07.tar.gz : make_test NO
Show quoted textcpan>