Author: ericwilhelm
Date: Sat Sep 22 11:26:06 2007
New Revision: 9977
Modified:
Module-Build/trunk/t/install.t
Module-Build/trunk/t/lib/MBTest.pm
Module-Build/trunk/t/manifypods.t
Log:
** remove test suite's parallel conflicts **
t/lib/MBTest.pm - per-process tmpdir()
t/install.t - add pid to t/install_test tmpdir
t/manifypods.t - add pid to t/install_test tmpdir
Modified: Module-Build/trunk/t/install.t
==============================================================================
--- Module-Build/trunk/t/install.t (original)
+++ Module-Build/trunk/t/install.t Sat Sep 22 11:26:06 2007
@@ -56,7 +56,7 @@
ok $mb;
-my $destdir = File::Spec->catdir($cwd, 't', 'install_test');
+my $destdir = File::Spec->catdir($cwd, 't', 'install_test.' . $$);
$mb->add_to_cleanup($destdir);
{
Modified: Module-Build/trunk/t/lib/MBTest.pm
==============================================================================
--- Module-Build/trunk/t/lib/MBTest.pm (original)
+++ Module-Build/trunk/t/lib/MBTest.pm Sat Sep 22 11:26:06 2007
@@ -3,6 +3,7 @@
use strict;
use File::Spec;
+use File::Path ();
BEGIN {
# Make sure none of our tests load the users ~/.modulebuildrc file
@@ -61,10 +62,15 @@
{ # Setup a temp directory if it doesn't exist
my $cwd = Cwd::cwd;
- my $tmp = File::Spec->catdir( $cwd, 't', '_tmp' );
+ my $tmp = File::Spec->catdir( $cwd, 't', '_tmp.' . $$);
mkdir $tmp, 0777 unless -d $tmp;
sub tmpdir { $tmp }
+ END {
+ if(-d $tmp) {
+ File::Path::rmtree($tmp) or warn "cannot clean dir '$tmp'";
+ }
+ }
}
########################################################################
Modified: Module-Build/trunk/t/manifypods.t
==============================================================================
--- Module-Build/trunk/t/manifypods.t (original)
+++ Module-Build/trunk/t/manifypods.t Sat Sep 22 11:26:06 2007
@@ -58,7 +58,7 @@
chdir( $dist->dirname ) or die "Can't chdir to '@{[$dist->dirname]}': $!";
use File::Spec::Functions qw( catdir );
-my $destdir = catdir($cwd, 't', 'install_test');
+my $destdir = catdir($cwd, 't', 'install_test.' . $$);
my $mb = Module::Build->new(