Permalink
Browse files

Tests should be capable of parallel execution now, reported by Floria…

…n Ragwitz RT #56981
  • Loading branch information...
bingos committed Apr 29, 2010
1 parent b419524 commit 8f6dcd2ea8b476fd45710cae5f807474c8e7aa64
Showing with 20 additions and 13 deletions.
  1. +4 −0 Changes
  2. +1 −0 Makefile.PL
  3. +1 −1 lib/Module/Install/AutoLicense.pm
  4. +7 −6 t/01_dist.t
  5. +7 −6 t/02_distdir.t
View
@@ -1,6 +1,10 @@
Changelog for Module-Install-AutoLicense
========================================
+0.06 Thu Apr 29 12:43:47 BST 2010
+ - tests should be capable of parallel execution now
+ reported by Florian Ragwitz RT #56981
+
0.04 Tue Apr 20 10:52:56 BST 2010
- $self->author is an array, so we
need to join the elements to make a string.
View
@@ -8,6 +8,7 @@ abstract_from 'lib/Module/Install/AutoLicense.pm';
license 'perl';
perl_version '5.006';
build_requires 'Test::More' => 0.47;
+build_requires 'File::Temp' => 0;
build_requires 'Capture::Tiny' => 0.05;
requires 'Module::Install' => 0.85;
requires 'Software::License' => 0.010;
@@ -5,7 +5,7 @@ use warnings;
use base qw(Module::Install::Base);
use vars qw($VERSION);
-$VERSION = '0.04';
+$VERSION = '0.06';
my %licenses = (
perl => 'Software::License::Perl_5',
View
@@ -1,23 +1,23 @@
use strict;
use warnings;
use Test::More; #tests => 1;
+use File::Temp qw[tempdir];
use File::Path qw[rmtree];
use Capture::Tiny qw[capture_merged];
use Config;
-# Cleanup
-eval { rmtree('dist') };
-
unless ( -e 'have_make' ) {
plan skip_all => 'No network tests';
}
plan tests => 4;
-my $make = $Config{make};
+{
-mkdir 'dist' or die "$!\n";
-chdir 'dist' or die "$!\n";
+my $make = $Config{make};
+mkdir 'dist';
+my $tmpdir = tempdir( DIR => 'dist', CLEANUP => 1 );
+chdir $tmpdir or die "$!\n";
open MFPL, '>Makefile.PL' or die "$!\n";
print MFPL <<EOF;
use strict;
@@ -66,3 +66,4 @@ diag("$manifest");
my $distdir = capture_merged { system "$make distdir" };
diag("$distdir");
+}
View
@@ -1,23 +1,22 @@
use strict;
use warnings;
use Test::More; #tests => 1;
+use File::Temp qw[tempdir];
use File::Path qw[rmtree];
use Capture::Tiny qw[capture_merged];
use Config;
-# Cleanup
-eval { rmtree('dist') };
-
unless ( -e 'have_make' ) {
plan skip_all => 'No network tests';
}
plan tests => 6;
+{
my $make = $Config{make};
-
-mkdir 'dist' or die "$!\n";
-chdir 'dist' or die "$!\n";
+mkdir 'dist';
+my $tmpdir = tempdir( DIR => 'dist', CLEANUP => 1 );
+chdir $tmpdir or die "$!\n";
open MFPL, '>Makefile.PL' or die "$!\n";
print MFPL <<EOF;
use strict;
@@ -76,3 +75,5 @@ ok( -e 'LICENSE', 'There is a LICENSE file' );
close $license;
like( $contents, qr/Foo Bar/s, 'Foo Bar is contained in the license file' );
}
+
+}

0 comments on commit 8f6dcd2

Please sign in to comment.