From: Rafael Garcia-Suarez Date: Mon, 23 Apr 2007 09:53:41 +0000 (+0000) Subject: Patch to config to avoid failures in the perl core due X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d7b854fe00117e28af7f34a53d806bb43a5efb4;p=p5sagit%2Fp5-mst-13.2.git Patch to config to avoid failures in the perl core due to too much verbosity (by Jos Boumans) p4raw-id: //depot/perl@31028 --- diff --git a/lib/CPANPLUS/t/inc/conf.pl b/lib/CPANPLUS/t/inc/conf.pl index 50c8970..0694a79 100644 --- a/lib/CPANPLUS/t/inc/conf.pl +++ b/lib/CPANPLUS/t/inc/conf.pl @@ -120,7 +120,7 @@ sub gimme_conf { # TEST_INSTALL_DIR_BIN, # TEST_INSTALL_DIR_MAN1, # TEST_INSTALL_DIR_MAN3, - ], 1 ); + ], ( $ENV{PERL_CORE} ? 0 : 1 ) ); return $conf; }; @@ -154,7 +154,7 @@ END { # TEST_INSTALL_DIR_BIN, # TEST_INSTALL_DIR_MAN1, # TEST_INSTALL_DIR_MAN3, - ], 1 ); + ], 0 ); # DO NOT be verbose under perl core -- makes tests fail } } @@ -168,6 +168,9 @@ sub _clean_test_dir { for my $dir ( @$dirs ) { + ### no point if it doesn't exist; + next unless -d $dir; + my $dh; opendir $dh, $dir or die "Could not open basedir '$dir': $!"; while( my $file = readdir $dh ) { @@ -177,7 +180,7 @@ sub _clean_test_dir { ### directory, rmtree it if( -d $path ) { - print "Deleting directory '$path'\n" if $verbose; + print "# Deleting directory '$path'\n" if $verbose; eval { rmtree( $path ) }; warn "Could not delete '$path' while cleaning up '$dir'" if $@;