Fix PostgresNode install_path sanity tests that fail on Windows
authorAndrew Dunstan <[email protected]>
Fri, 15 Oct 2021 16:56:29 +0000 (12:56 -0400)
committerAndrew Dunstan <[email protected]>
Fri, 15 Oct 2021 16:56:29 +0000 (12:56 -0400)
Backpatch to 14 where install_path was introduced.

src/test/perl/PostgresNode.pm

index c59da758c7ee9a4c62dd633bef1e8bc4bbea0f91..ba80baf09131063b29bde205aac4252503f35902 100644 (file)
@@ -1271,9 +1271,10 @@ sub _set_pg_version
        # complain about that, too.
        $pg_config = "$inst/bin/pg_config";
        BAIL_OUT("pg_config not found: $pg_config")
-         unless -e $pg_config;
+         unless -e $pg_config
+         or ($TestLib::windows_os and -e "$pg_config.exe");
        BAIL_OUT("pg_config not executable: $pg_config")
-         unless -x $pg_config;
+         unless $TestLib::windows_os or -x $pg_config;
 
        # Leave $pg_config install_path qualified, to be sure we get the right
        # version information, below, or die trying