Change 34328 by [EMAIL PROTECTED] on 2008/09/09 16:32:08
Subject: [PATCH] Fix parallel testing temp filenames
From: "Jerry D. Hedden" <[EMAIL PROTECTED]>
Message-ID: <[EMAIL PROTECTED]>
Date: Tue, 9 Sep 2008 11:52:45 -0400
Affected files ...
... //depot/perl/lib/charnames.t#31 edit
... //depot/perl/lib/strict.t#12 edit
... //depot/perl/lib/subs.t#5 edit
Differences ...
==== //depot/perl/lib/charnames.t#31 (text) ====
Index: perl/lib/charnames.t
--- perl/lib/charnames.t#30~28366~ 2006-06-07 02:13:51.000000000 -0700
+++ perl/lib/charnames.t 2008-09-09 09:32:08.000000000 -0700
@@ -271,10 +271,9 @@
# ---- 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;
==== //depot/perl/lib/strict.t#12 (text) ====
Index: perl/lib/strict.t
--- perl/lib/strict.t#11~33876~ 2008-05-20 02:29:33.000000000 -0700
+++ perl/lib/strict.t 2008-09-09 09:32:08.000000000 -0700
@@ -4,6 +4,7 @@
chdir 't' if -d 't';
@INC = '../lib';
$ENV{PERL5LIB} = '../lib';
+ require './test.pl';
}
$| = 1;
@@ -11,9 +12,8 @@
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 @@
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';
==== //depot/perl/lib/subs.t#5 (text) ====
Index: perl/lib/subs.t
--- perl/lib/subs.t#4~22091~ 2004-01-07 11:09:50.000000000 -0800
+++ perl/lib/subs.t 2008-09-09 09:32:08.000000000 -0700
@@ -4,6 +4,7 @@
chdir 't' if -d 't';
@INC = '../lib';
$ENV{PERL5LIB} = '../lib';
+ require './test.pl';
}
$| = 1;
@@ -15,9 +16,8 @@
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 @@
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'.
End of Patch.