diff options
author | Jerry D. Hedden <jdhedden@cpan.org> | 2008-09-09 07:52:45 -0400 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2008-09-09 16:32:08 +0000 |
commit | 0642d82a230efbe169e4a441b6943c36ff880a90 (patch) | |
tree | 5286859b35c915ccbfb361ddd6a8f95ab34ef54f | |
parent | 8b80c7bdc64efa77b50d19f1c6b4b544143cec29 (diff) | |
download | perl-0642d82a230efbe169e4a441b6943c36ff880a90.tar.gz |
Fix parallel testing temp filenames
From: "Jerry D. Hedden" <jdhedden@cpan.org>
Message-ID: <1ff86f510809090852radb1044k43ff848c2d1e11fa@mail.gmail.com>
Date: Tue, 9 Sep 2008 11:52:45 -0400
p4raw-id: //depot/perl@34328
-rw-r--r-- | lib/charnames.t | 3 | ||||
-rw-r--r-- | lib/strict.t | 6 | ||||
-rw-r--r-- | lib/subs.t | 6 |
3 files changed, 7 insertions, 8 deletions
diff --git a/lib/charnames.t b/lib/charnames.t index d0139070cf..4889562455 100644 --- a/lib/charnames.t +++ b/lib/charnames.t @@ -271,10 +271,9 @@ print "ok 46\n"; # ---- Alias extensions -my $tmpfile = "tmp0000"; +my $tmpfile = tempfile(); my $alifile = File::Spec->catfile(File::Spec->updir, qw(lib unicore xyzzy_alias.pl)); my $i = 0; -1 while -e ++$tmpfile; END { if ($tmpfile) { 1 while unlink $tmpfile; } } my @prgs; diff --git a/lib/strict.t b/lib/strict.t index 16dcbec5eb..1176be8083 100644 --- a/lib/strict.t +++ b/lib/strict.t @@ -4,6 +4,7 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; $ENV{PERL5LIB} = '../lib'; + require './test.pl'; } $| = 1; @@ -11,9 +12,8 @@ $| = 1; my $Is_VMS = $^O eq 'VMS'; my $Is_MSWin32 = $^O eq 'MSWin32'; my $Is_NetWare = $^O eq 'NetWare'; -my $tmpfile = "tmp0000"; +my $tmpfile = tempfile(); my $i = 0 ; -1 while -e ++$tmpfile; END { if ($tmpfile) { 1 while unlink $tmpfile; } } my @prgs = () ; @@ -78,7 +78,7 @@ for (@prgs){ my $status = $?; $results =~ s/\n+$//; # allow expected output to be written as if $prog is on STDIN - $results =~ s/tmp\d+/-/g; + $results =~ s/tmp\d+[A-Z][A-Z]?/-/g; $results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS; # clip off DCL status msg $expected =~ s/\n+$//; $expected =~ s|(\./)?abc\.pm|:abc.pm|g if $^O eq 'MacOS'; diff --git a/lib/subs.t b/lib/subs.t index 92f4302730..7952c20a6c 100644 --- a/lib/subs.t +++ b/lib/subs.t @@ -4,6 +4,7 @@ BEGIN { chdir 't' if -d 't'; @INC = '../lib'; $ENV{PERL5LIB} = '../lib'; + require './test.pl'; } $| = 1; @@ -15,9 +16,8 @@ my $Is_VMS = $^O eq 'VMS'; my $Is_MSWin32 = $^O eq 'MSWin32'; my $Is_NetWare = $^O eq 'NetWare'; my $Is_MacOS = $^O eq 'MacOS'; -my $tmpfile = "tmp0000"; +my $tmpfile = tempfile(); my $i = 0 ; -1 while -e ++$tmpfile; END { if ($tmpfile) { 1 while unlink $tmpfile} } for (@prgs){ @@ -59,7 +59,7 @@ for (@prgs){ my $status = $?; $results =~ s/\n+$//; # allow expected output to be written as if $prog is on STDIN - $results =~ s/tmp\d+/-/g; + $results =~ s/tmp\d+[A-Z][A-Z]?/-/g; $results =~ s/\n%[A-Z]+-[SIWEF]-.*$// if $Is_VMS; # clip off DCL status msg # bison says 'parse error' instead of 'syntax error', # various yaccs may or may not capitalize 'syntax'. |