summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorFlorian Ragwitz <rafl@debian.org>2011-01-22 09:03:20 +0100
committerFlorian Ragwitz <rafl@debian.org>2011-01-22 14:26:04 +0100
commitcbf59d5a089ce312aef2577512b2b2599ffdd6d5 (patch)
tree687738deb4ebff219c72ebd1772189845be49e93 /dist
parentf1495101f8b951dc126f5898777a723f994cc6a4 (diff)
downloadperl-cbf59d5a089ce312aef2577512b2b2599ffdd6d5.tar.gz
Stop EU::CBuilder's tests from failing in parallel
It used to use the same paths for temporary files in all tests. This blew up randomly when the tests were run in parallel.
Diffstat (limited to 'dist')
-rw-r--r--dist/ExtUtils-CBuilder/t/01-basic.t10
-rw-r--r--dist/ExtUtils-CBuilder/t/02-link.t6
-rw-r--r--dist/ExtUtils-CBuilder/t/03-cplusplus.t10
-rw-r--r--dist/ExtUtils-CBuilder/t/04-base.t12
4 files changed, 19 insertions, 19 deletions
diff --git a/dist/ExtUtils-CBuilder/t/01-basic.t b/dist/ExtUtils-CBuilder/t/01-basic.t
index ffcd60ce9c..70305afb70 100644
--- a/dist/ExtUtils-CBuilder/t/01-basic.t
+++ b/dist/ExtUtils-CBuilder/t/01-basic.t
@@ -30,11 +30,11 @@ ok $b, "created EU::CB object";
ok $b->have_compiler, "have_compiler";
-$source_file = File::Spec->catfile('t', 'compilet.c');
+$source_file = File::Spec->catfile('t', 'basict.c');
{
local *FH;
open FH, "> $source_file" or die "Can't create $source_file: $!";
- print FH "int boot_compilet(void) { return 1; }\n";
+ print FH "int boot_basict(void) { return 1; }\n";
close FH;
}
ok -e $source_file, "source file '$source_file' created";
@@ -48,7 +48,7 @@ $lib_file = $b->lib_file($object_file);
ok 1;
my ($lib, @temps) = $b->link(objects => $object_file,
- module_name => 'compilet');
+ module_name => 'basict');
$lib =~ tr/"'//d;
is $lib_file, $lib;
@@ -58,8 +58,8 @@ for ($source_file, $object_file, $lib_file) {
}
if ($^O eq 'VMS') {
- 1 while unlink 'COMPILET.LIS';
- 1 while unlink 'COMPILET.OPT';
+ 1 while unlink 'BASICT.LIS';
+ 1 while unlink 'BASICT.OPT';
}
my @words = $b->split_like_shell(' foo bar');
diff --git a/dist/ExtUtils-CBuilder/t/02-link.t b/dist/ExtUtils-CBuilder/t/02-link.t
index 822b071223..e6dba55593 100644
--- a/dist/ExtUtils-CBuilder/t/02-link.t
+++ b/dist/ExtUtils-CBuilder/t/02-link.t
@@ -31,7 +31,7 @@ else {
ok $b, "created EU::CB object";
-$source_file = File::Spec->catfile('t', 'compilet.c');
+$source_file = File::Spec->catfile('t', 'linkt.c');
{
open my $FH, "> $source_file" or die "Can't create $source_file: $!";
print $FH "int main(void) { return 11; }\n";
@@ -77,8 +77,8 @@ for ($source_file, $object_file, $exe_file) {
}
if ($^O eq 'VMS') {
- 1 while unlink 'COMPILET.LIS';
- 1 while unlink 'COMPILET.OPT';
+ 1 while unlink 'LINKT.LIS';
+ 1 while unlink 'LINKT.OPT';
}
sub my_system {
diff --git a/dist/ExtUtils-CBuilder/t/03-cplusplus.t b/dist/ExtUtils-CBuilder/t/03-cplusplus.t
index 02555df3db..638a0a2023 100644
--- a/dist/ExtUtils-CBuilder/t/03-cplusplus.t
+++ b/dist/ExtUtils-CBuilder/t/03-cplusplus.t
@@ -30,10 +30,10 @@ ok $b, "created EU::CB object";
ok $b->have_cplusplus, "have_cplusplus";
-$source_file = File::Spec->catfile('t', 'compilet.cc');
+$source_file = File::Spec->catfile('t', 'cplust.cc');
{
open my $FH, "> $source_file" or die "Can't create $source_file: $!";
- print $FH "class Bogus { public: int boot_compilet() { return 1; } };\n";
+ print $FH "class Bogus { public: int boot_cplust() { return 1; } };\n";
close $FH;
}
ok -e $source_file, "source file '$source_file' created";
@@ -47,7 +47,7 @@ $lib_file = $b->lib_file($object_file);
ok 1;
my ($lib, @temps) = $b->link(objects => $object_file,
- module_name => 'compilet');
+ module_name => 'cplust');
$lib =~ tr/"'//d;
is $lib_file, $lib;
@@ -57,7 +57,7 @@ for ($source_file, $object_file, $lib_file) {
}
if ($^O eq 'VMS') {
- 1 while unlink 'COMPILET.LIS';
- 1 while unlink 'COMPILET.OPT';
+ 1 while unlink 'CPLUST.LIS';
+ 1 while unlink 'CPLUST.OPT';
}
diff --git a/dist/ExtUtils-CBuilder/t/04-base.t b/dist/ExtUtils-CBuilder/t/04-base.t
index 5b235a5313..c3bf6b5ca6 100644
--- a/dist/ExtUtils-CBuilder/t/04-base.t
+++ b/dist/ExtUtils-CBuilder/t/04-base.t
@@ -129,14 +129,14 @@ $base = ExtUtils::CBuilder::Base->new( quiet => 1 );
ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" );
isa_ok( $base, 'ExtUtils::CBuilder::Base' );
-$source_file = File::Spec->catfile('t', 'compilet.c');
+$source_file = File::Spec->catfile('t', 'baset.c');
create_c_source_file($source_file);
ok(-e $source_file, "source file '$source_file' created");
# object filename automatically assigned
my $obj_ext = $base->{config}{obj_ext};
is( $base->object_file($source_file),
- File::Spec->catfile('t', "compilet$obj_ext"),
+ File::Spec->catfile('t', "baset$obj_ext"),
"object_file(): got expected automatically assigned name for object file"
);
@@ -155,7 +155,7 @@ $base = ExtUtils::CBuilder::Base->new( quiet => 1 );
ok( $base, "ExtUtils::CBuilder::Base->new() returned true value" );
isa_ok( $base, 'ExtUtils::CBuilder::Base' );
-$source_file = File::Spec->catfile('t', 'compilet.c');
+$source_file = File::Spec->catfile('t', 'baset.c');
create_c_source_file($source_file);
ok(-e $source_file, "source file '$source_file' created");
@@ -337,14 +337,14 @@ for ($source_file, $object_file, $lib_file) {
pass("Completed all tests in $0");
if ($^O eq 'VMS') {
- 1 while unlink 'COMPILET.LIS';
- 1 while unlink 'COMPILET.OPT';
+ 1 while unlink 'BASET.LIS';
+ 1 while unlink 'BASET.OPT';
}
sub create_c_source_file {
my $source_file = shift;
open my $FH, '>', $source_file or die "Can't create $source_file: $!";
- print $FH "int boot_compilet(void) { return 1; }\n";
+ print $FH "int boot_baset(void) { return 1; }\n";
close $FH;
}