Skip to content

Commit

Permalink
Tests should be capable of parallel execution now, reported by Floria…
Browse files Browse the repository at this point in the history
…n Ragwitz RT #56981
  • Loading branch information
bingos committed Apr 29, 2010
1 parent b419524 commit 8f6dcd2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
4 changes: 4 additions & 0 deletions Changes
@@ -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.
Expand Down
1 change: 1 addition & 0 deletions Makefile.PL
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/Module/Install/AutoLicense.pm
Expand Up @@ -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',
Expand Down
13 changes: 7 additions & 6 deletions t/01_dist.t
@@ -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;
Expand Down Expand Up @@ -66,3 +66,4 @@ diag("$manifest");

my $distdir = capture_merged { system "$make distdir" };
diag("$distdir");
}
13 changes: 7 additions & 6 deletions t/02_distdir.t
@@ -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;
Expand Down Expand Up @@ -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.