Cause TestLib.pm to define $windows_os in all branches.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 12 Oct 2015 23:35:38 +0000 (19:35 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 12 Oct 2015 23:35:38 +0000 (19:35 -0400)
Back-port of a part of commit 690ed2b76ab91eb79ea04ee2bfbdc8a2693f2a37 that
I'd depended on without realizing that it was only added recently.  Since
it seems entirely likely that other such tests will need to be back-patched
in future, providing the flag seems like a better answer than just putting
a test in-line.

Per buildfarm.

src/test/perl/TestLib.pm

index 9402e4462c3a831cb9b1607a87476c33d68530a3..2e04476052e3170fcee8f1eb6f97304bc03d4d95 100644 (file)
@@ -26,6 +26,7 @@ our @EXPORT = qw(
 
   $tmp_check
   $log_path
+  $windows_os
 );
 
 use Cwd;
@@ -38,6 +39,8 @@ use SimpleTee;
 
 use Test::More;
 
+our $windows_os = $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys';
+
 # Open log file. For each test, the log file name uses the name of the
 # file launching this module, without the .pl suffix.
 our ($tmp_check, $log_path);