Skip Menu |

This queue is for tickets about the ExtUtils-Install CPAN distribution.

Report information
The Basics
Id: 31249
Status: resolved
Priority: 0/
Queue: ExtUtils-Install

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

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



Subject: basic.t not basic enough, remove non-EUI related tests.
I ran ExtUtils::Install against a fairly clean 5.6.2, which is using MakeMaker 6.17. It trips on the basic.t test, specifically the META.yml tests. ok 54 - disttest not ok 55 - META.yml not written to source dir # Failed test 'META.yml not written to source dir' # in t/basic.t at line 222. not ok 56 - META.yml written to dist dir # Failed test 'META.yml written to dist dir' # in t/basic.t at line 223. ok 57 - temp META.yml file not left around not ok 58 # Failed test in t/basic.t at line 226. # No such file or directory readline() on closed filehandle META at t/basic.t line 227. Modification of non-creatable array value attempted, subscript -1 at t/basic.t line 228. ok 59 ok 60 - teardown # Looks like you planned 70 tests but only ran 60. There's nothing actually wrong, just MakeMaker 6.17 did META.yml a little differently. There's no reason why ExtUtils::Install should be testing META.yml or disttest or realclean or init_dirscan. Everything starting at the disttest test down should be removed.
And here's the patch.
--- t/basic.t (revision 40798) +++ t/basic.t (local) @@ -20,7 +20,7 @@ use strict; use Config; -use Test::More tests => 70; +use Test::More tests => 55; use MakeMaker::Test::Utils; use MakeMaker::Test::Setup::BFD; use File::Find; @@ -207,70 +207,3 @@ ok( $files{'perllocal.pod'},' perllocal.pod created' ); rmtree('other'); } - - -my $dist_test_out = run("$make disttest"); -is( $?, 0, 'disttest' ) || diag($dist_test_out); - -# Test META.yml generation -use ExtUtils::Manifest qw(maniread); - -my $distdir = 'Big-Dummy-0.01'; -$distdir =~ s/\./_/g if $Is_VMS; -my $meta_yml = "$distdir/META.yml"; - -ok( !-f 'META.yml', 'META.yml not written to source dir' ); -ok( -f $meta_yml, 'META.yml written to dist dir' ); -ok( !-e "META_new.yml", 'temp META.yml file not left around' ); - -ok open META, $meta_yml or diag $!; -my @meta = <META>; -like $meta[-1], '/\n$/', "META.yml ends with a newline"; -ok close META; - -my $manifest = maniread("$distdir/MANIFEST"); -# VMS is non-case preserving, so we can't know what the MANIFEST will -# look like. :( -_normalize($manifest); -is( $manifest->{'meta.yml'}, 'Module meta-data (added by MakeMaker)' ); - - -# Test NO_META META.yml suppression -unlink $meta_yml; -ok( !-f $meta_yml, 'META.yml deleted' ); -@mpl_out = run(qq{$perl Makefile.PL "NO_META=1"}); -cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out); -my $distdir_out = run("$make distdir"); -is( $?, 0, 'distdir' ) || diag($distdir_out); -ok( !-f $meta_yml, 'META.yml generation suppressed by NO_META' ); - - -# Make sure init_dirscan doesn't go into the distdir -@mpl_out = run(qq{$perl Makefile.PL "PREFIX=../dummy-install"}); - -cmp_ok( $?, '==', 0, 'Makefile.PL exited with zero' ) || diag(@mpl_out); - -ok( grep(/^Writing $makefile for Big::Dummy/, @mpl_out) == 1, - 'init_dirscan skipped distdir') || - diag(@mpl_out); - -# I know we'll get ignored errors from make here, that's ok. -# Send STDERR off to oblivion. -open(SAVERR, ">&STDERR") or die $!; -open(STDERR, ">".File::Spec->devnull) or die $!; - -my $realclean_out = run("$make realclean"); -is( $?, 0, 'realclean' ) || diag($realclean_out); - -open(STDERR, ">&SAVERR") or die $!; -close SAVERR; - - -sub _normalize { - my $hash = shift; - - while(my($k,$v) = each %$hash) { - delete $hash->{$k}; - $hash->{lc $k} = $v; - } -}
Ping?
Subject: Re: [rt.cpan.org #31249] basic.t not basic enough, remove non-EUI related tests.
Date: Fri, 29 Feb 2008 05:22:02 +0100
To: bug-ExtUtils-Install [...] rt.cpan.org
From: demerphq <demerphq [...] gmail.com>
On 29/02/2008, Michael G Schwern via RT <bug-ExtUtils-Install@rt.cpan.org> wrote: Show quoted text
> > Queue: ExtUtils-Install > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=31249 > > > > Ping? >
will investigate and patch as soon as tuits are available. -- perl -Mre=debug -e "/just|another|perl|hacker/"
closed in 1.46 -- thanks for the patch