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

src/test/perl/PostgresNode.pm

index ed5b4a1c4b53a656ad9932764051c5147d94b7cf..02a9f49843afb18aeb9c7cd0b254c2fea221db14 100644 (file)
@@ -1237,9 +1237,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