This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Avoid a potential testing race condition in Shell.pm's test.
authorNicholas Clark <nick@ccl4.org>
Wed, 6 Aug 2008 21:36:45 +0000 (21:36 +0000)
committerNicholas Clark <nick@ccl4.org>
Wed, 6 Aug 2008 21:36:45 +0000 (21:36 +0000)
p4raw-id: //depot/perl@34175

lib/Shell.t

index c76628c..23c1e0e 100644 (file)
@@ -41,6 +41,11 @@ ok(($^O eq 'os2' xor !(-s $tmpfile)), '$Shell::capture_stderr');
 
 $Shell::capture_stderr = 0;
 
+# Trying to do two repeated C<ls>s in t in core and expecting the same output
+# is a race condition when tests are running in parallel, and using it as a
+# temporary directory. So go somewhere quieter.
+chdir 'uni' if $ENV{PERL_CORE} && -d 'uni';
+
 # someone will have to fill in the blanks for other platforms
 
 if ($Is_VMS) {