Skip Menu |

This queue is for tickets about the TAP-Harness-Archive CPAN distribution.

Report information
The Basics
Id: 37795
Status: resolved
Priority: 0/
Queue: TAP-Harness-Archive

People
Owner: Nobody in particular
Requestors: theckman [...] panix.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: tests fail under Windows. unable to install
Date: Fri, 18 Jul 2008 21:04:25 -0400
To: bug-TAP-Harness-Archive [...] rt.cpan.org
From: Tim Heckman <theckman [...] panix.com>
During the "make test" part of the install, it seems the tests are unable to delete temp directories after creating them. Not sure why this would be happening, as when I examine the folders in Windows explorer there doesn't seem to be anything strange about them (security options look correct, and I am able to delete them manually without any problem). Output from installation attempt: ----------------------- Show quoted text
cpan> install TAP::Harness::Archive
Running install for module 'TAP::Harness::Archive' Running make for W/WO/WONKO/TAP-Harness-Archive-0.10.tar.gz Has already been unwrapped into directory C:\Perl\cpan\build\TAP-Harness-Archi ve-0.10-klqbbC Has already been made Running make test Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bl ib\lib', 'blib\arch')" t/*.t t/archive...............1/42 cannot remove directory for C:\DOCUME~1\Tim\LOCALS~ 1\Temp\j9RYhjpvJH: Permission denied at C:\Perl\cpan\build\TAP-Harness-Archive-0 .10-klqbbC\blib\lib/TAP/Harness/Archive.pm line 342 cannot remove directory for C:\DOCUME~1\Tim\LOCALS~1\Temp\6hnRIwwuPI: Permission denied at C:\Perl\cpan\build\TAP-Harness-Archive-0.10-klqbbC\blib\lib/TAP/Harne ss/Archive.pm line 342 t/archive...............ok t/bar...................ok t/extra_files...........1/10 cannot remove directory for C:\DOCUME~1\Tim\LOCALS~ 1\Temp\FdJuCbRkFP: Permission denied at C:\Perl\cpan\build\TAP-Harness-Archive-0 .10-klqbbC\blib\lib/TAP/Harness/Archive.pm line 342 # Failed test 'Archive contains extra file t\extra_files\log1.txt' # at t/extra_files.t line 56. # Failed test 'Archive contains extra file t\extra_files\log2.txt' # at t/extra_files.t line 56. # Failed test 'Archive contains extra file t\extra_files\stuff\svk.info' # at t/extra_files.t line 56. # Looks like you failed 3 tests of 10. t/extra_files........... Dubious, test returned 3 (wstat 768, 0x300) Failed 3/10 subtests t/extra_properties......1/5 cannot remove directory for C:\DOCUME~1\Tim\LOCALS~1 \Temp\nIOIjCIVzE: Permission denied at C:\Perl\cpan\build\TAP-Harness-Archive-0. 10-klqbbC\blib\lib/TAP/Harness/Archive.pm line 342 t/extra_properties......ok t/foo...................ok t/pod-coverage..........Math::BigInt: couldn't load specified math lib(s), fallb ack to Math::BigInt::FastCalc at C:/Perl/lib/Win32API/File.pm line 21 t/pod-coverage..........ok t/pod...................ok Test Summary Report ------------------- t/extra_files.t (Wstat: 768 Tests: 10 Failed: 3) Failed tests: 8-10 Non-zero exit status: 3 Files=7, Tests=64, 2 wallclock secs ( 0.02 usr + 0.05 sys = 0.06 CPU) Result: FAIL Failed 1/7 test programs. 3/64 subtests failed. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xff' Stop. WONKO/TAP-Harness-Archive-0.10.tar.gz nmake test -- NOT OK //hint// to see the cpan-testers results for installing this module, try: reports WONKO/TAP-Harness-Archive-0.10.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: WONKO/TAP-Harness-Archive-0.10.tar.gz : make_test NO
Subject: [rt.cpan.org #37795] perl version
Date: Fri, 18 Jul 2008 21:10:16 -0400
To: bug-TAP-Harness-Archive [...] rt.cpan.org
From: Tim Heckman <theckman [...] panix.com>
My perl version information: Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='15.0.21022', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86' libpth=\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -libpath:"C:\Perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 1003 [285500] 33741 avoids segfaults invoking S_raise_signal() (on Linux) 33763 Win32 process ids can have more than 16 bits 32809 Load 'loadable object' with non-default file extension 32728 64-bit fix for Time::Local Built under MSWin32 Compiled at May 13 2008 16:52:49 @INC: C:/Perl/site/lib C:/Perl/lib .
Subject: [rt.cpan.org #37795] Fixes for make test problems
Date: Sat, 19 Jul 2008 01:23:16 -0400
To: bug-TAP-Harness-Archive [...] rt.cpan.org
From: Tim Heckman <theckman [...] panix.com>
I figured out how to make the tests pass on windows. One is possibly a bug in Archive.pm. The other was a matter of adjusting the test. 1) In Archive.pm, do the chdir before calling rmtree. *** Archive.pm.orig Fri Jul 04 18:51:09 2008 --- Archive.pm Sat Jul 19 00:02:01 2008 *************** *** 340,345 **** # be nice and clean up - File::Path::rmtree($dir); chdir($cwd) or $class->_croak("Could not return to directory $cwd: $!"); return $aggregator; --- 340,345 ---- # be nice and clean up chdir($cwd) or $class->_croak("Could not return to directory $cwd: $!"); + File::Path::rmtree($dir); return $aggregator; 2) In extra_files.t Windows gives you paths with backslashes, but Archive::Tar returns the paths with forward slashes. Not sure what the best solution is, but this works: *** extra_files.t.orig Fri Jul 04 18:51:09 2008 --- extra_files.t Sat Jul 19 01:16:31 2008 *************** *** 2,6 **** use Test::More; use File::Temp (); ! use File::Spec::Functions qw(catfile catdir file_name_is_absolute); use TAP::Harness::Archive; use Archive::Tar; --- 2,6 ---- use Test::More; use File::Temp (); ! use File::Spec::Functions qw(catfile catdir file_name_is_absolute splitdir); use TAP::Harness::Archive; use Archive::Tar; *************** *** 53,58 **** my $tar = Archive::Tar->new($file); isa_ok($tar, 'Archive::Tar'); ! foreach my $extra_file (@extra_files) { ! ok($tar->contains_file($extra_file), "Archive contains extra file $extra_file"); } --- 53,63 ---- my $tar = Archive::Tar->new($file); isa_ok($tar, 'Archive::Tar'); ! my @contents = $tar->list_files(); ! foreach my $extra_file(@extra_files) { ! # Archive::Tar returns file names with "/" path separator. ! # Passing it through catdir(splitdir()) will give us the ! # correct system path separator (e.g. "\" on Win32). ! my $count = () = grep {catdir(splitdir($_)) eq $extra_file} @contents; ! ok($count == 1 , "Archive contains extra file $extra_file"); } -- tjh
I don't have a Win32 box to test on, but these patches look plausible as they are similar to other tempdir problems I've encountered on Windows when writing tests. Jim Keenan
I manually applied Tim's patches to the latest copy I have of TAP::Harness:Archive in my .cpan/build/ directory on Mac OS X, and all tests continue to pass: $ make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/archive.............ok t/bar.................ok t/extra_files.........ok t/extra_properties....ok t/foo.................ok t/pod-coverage........ok t/pod.................ok All tests successful. Files=7, Tests=64, 6 wallclock secs ( 0.13 usr 0.08 sys + 3.28 cusr 1.08 csys = 4.57 CPU) Result: PASS
These look good. Applied with some minor tweaks for style. TAP::Harness::Archive 0.11 should be arriving on your local CPAN mirror shortly with the fix. Please update, give it for a spin and let me know if it fixes the problem for you. Thanks!
Subject: Re: [rt.cpan.org #37795] tests fail under Windows. unable to install
Date: Mon, 21 Jul 2008 00:40:11 -0400
To: bug-TAP-Harness-Archive [...] rt.cpan.org
From: Tim Heckman <theckman [...] panix.com>
New breakage in 0.11. archive.t was changed to add a call to rel2abs(). This breaks the test on Windows. ==================== C:\work\TAP-Harness-Archive-0.11-gtImHI>nmake test Microsoft (R) Program Maintenance Utility Version 9.00.21022.08 Copyright (C) Microsoft Corporation. All rights reserved. C:\Perl\bin\perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'bl ib\lib', 'blib\arch')" t/*.t t/archive.............1/42 mkdir C:\DOCUME~1\Tim\LOCALS~1\Temp\JVwBZNnK3J\C:\: I nvalid argument; The filename, directory name, or volume label syntax is incorre ct at C:/Perl/site/lib/TAP/Harness.pm line 767 at t/archive.t line 21 # Looks like you planned 42 tests but only ran 2. # Looks like your test died just after 2. t/archive............. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 40/42 subtests t/bar.................ok t/extra_files.........ok t/extra_properties....ok t/foo.................ok t/pod-coverage........skipped: We are not running release tests t/pod.................skipped: We are not running release tests Test Summary Report ------------------- t/archive (Wstat: 65280 Tests: 2 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 42 tests but ran 2. Files=7, Tests=22, 2 wallclock secs ( 0.05 usr + 0.01 sys = 0.06 CPU) Result: FAIL Failed 1/7 test programs. 0/22 subtests failed. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xff' Stop. ======================== This can be fixed by removing the rel2abs() call: *** t\archive.t.orig Sat Jul 19 14:58:12 2008 --- t\archive.t Mon Jul 21 00:27:28 2008 *************** *** 13,19 **** # a temp directory to put everything in my $temp_dir = File::Temp->tempdir('tap-archive-XXXXXXXX', CLEANUP => 1); ! my @testfiles = map { rel2abs(catfile('t', $_)) } qw(foo.t bar.t); # first a .tar file $file = catfile($temp_dir, 'archive.tar'); --- 13,19 ---- # a temp directory to put everything in my $temp_dir = File::Temp->tempdir('tap-archive-XXXXXXXX', CLEANUP => 1); ! my @testfiles = map { catfile('t', $_) } qw(foo.t bar.t); # first a .tar file $file = catfile($temp_dir, 'archive.tar'); Michael Peters via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=37795 > > > These look good. Applied with some minor tweaks for style. > TAP::Harness::Archive 0.11 should be arriving on your local CPAN mirror > shortly with the fix. Please update, give it for a spin and let me know > if it fixes the problem for you. > > Thanks! >
On Mon Jul 21 00:41:03 2008, theckman@panix.com wrote: Show quoted text
> New breakage in 0.11. archive.t was changed to add a call to rel2abs(). > This breaks the test on Windows.
Does rel2abs() not work on Windows? Try 0.12 and see if it fixes this issue. Thanks again for testing this out!
Subject: Re: [rt.cpan.org #37795] tests fail under Windows. unable to install
Date: Mon, 21 Jul 2008 11:12:53 -0400
To: bug-TAP-Harness-Archive [...] rt.cpan.org
From: Tim Heckman <theckman [...] panix.com>
rel2abs() works, but I think what happens is that in Harness.pm around line 762 it concatenates C:\$temporary_dir to the path portion of the file names passed in, which are absolute when you use rel2abs in the test script, so you get C:\$temp_dir\C:\$build_dir\t\ and it blows up when you try to call mkpath() with this. On Jul 21, 2008, at 10:14 AM, Michael Peters via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=37795 > > > On Mon Jul 21 00:41:03 2008, theckman@panix.com wrote:
>> New breakage in 0.11. archive.t was changed to add a call to >> rel2abs(). >> This breaks the test on Windows.
> > Does rel2abs() not work on Windows? > > Try 0.12 and see if it fixes this issue. > > Thanks again for testing this out! > > >
Fixed in 0.12