Hi, On 2022-01-24 16:47:28 -0500, Andrew Dunstan wrote: > Give me what you can and I'll see what I can do. I have a couple of > moderately high priority items on my plate, but I will probably be able > to fit in some testing when those make my eyes completely glaze over.
Steps: # install msys from https://www.msys2.org/ # install dependencies in msys shell pacman -S git bison flex make ucrt64/mingw-w64-ucrt-x86_64-perl ucrt64/mingw-w64-ucrt-x86_64-gcc ucrt64/mingw-w64-ucrt-x86_64-zlib ucrt64/mingw-w64-ucrt-x86_64-ccache diffutils # start mingw ucrt64 x64 shell cpan install -T IPC::Run perl -MIPC::Run -e 1 # verify ipc run is installed cd /c/dev # I added --reference postgres to accelerate the cloning git clone https://git.postgresql.org/git/postgresql.git postgres-mingw cd /c/dev/postgres-mingw git revert ed52c3707bcf8858defb0d9de4b55f5c7f18fed7 git revert 6051857fc953a62db318329c4ceec5f9668fd42a # apply attached patch # see below why out-of-tree is easier or now mkdir build cd build # path parameters probably not necessary, I thought I needed them earlier, not sure why ../configure --without-readline --cache cache --enable-tap-tests PROVE=/ucrt64/bin/core_perl/prove PERL=/ucrt64/bin/perl.exe CC="ccache gcc" make -j8 -s world-bin && make -j8 -s -C src/interfaces/ecpg/test make -j8 -s temp-install # pg_regress' make_temp_socketdir() otherwise picks up the wrong TMPDIR mkdir /c/dev/postgres-mingw/build/tmp # the TAR= ensures that tests pick up a tar accessible with a windows path # PG_TEST_USE_UNIX_SOCKETS=1 is required for test concurrency, otherwise there are port conflicts (make -Otarget -j12 check-world NO_TEMP_INSTALL=1 PG_TEST_USE_UNIX_SOCKETS=1 TMPDIR=C:/dev/postgres-mingw/tmp TAR="C:\Windows\System32\tar.exe" 2>&1 && echo test-world-success || echo test-world-fail) 2>&1 |tee test-world.log To make tests in "in-tree" builds work, a bit more hackery would be needed. The problem is that windows chooses binaries from the current working directory *before* PATH. That's a problem for things like initdb.exe or pg_ctl.exe that want to find postgres.exe, as that only works with the program in their proper location, rather than CWD. Greetings, Andres Freund
diff --git i/src/bin/pg_dump/t/010_dump_connstr.pl w/src/bin/pg_dump/t/010_dump_connstr.pl index 2f7919a4b31..bac15ac748a 100644 --- i/src/bin/pg_dump/t/010_dump_connstr.pl +++ w/src/bin/pg_dump/t/010_dump_connstr.pl @@ -8,7 +8,8 @@ use PostgreSQL::Test::Cluster; use PostgreSQL::Test::Utils; use Test::More; -if ($PostgreSQL::Test::Utils::is_msys2) +# FIXME: needs to be readjusted +if ($PostgreSQL::Test::Utils::is_msys2 || 1) { plan skip_all => 'High bit name tests fail on Msys2'; } diff --git i/contrib/citext/Makefile w/contrib/citext/Makefile index 789932fe366..8e569c96c48 100644 --- i/contrib/citext/Makefile +++ w/contrib/citext/Makefile @@ -11,7 +11,8 @@ DATA = citext--1.4.sql \ citext--1.0--1.1.sql PGFILEDESC = "citext - case-insensitive character string data type" -REGRESS = citext citext_utf8 +# FIXME: broken under mingw-ucrt (and maybe mingw generally?) +#REGRESS = citext citext_utf8 ifdef USE_PGXS PG_CONFIG = pg_config diff --git i/src/test/perl/PostgreSQL/Test/Utils.pm w/src/test/perl/PostgreSQL/Test/Utils.pm index 50be10fb5af..f1268a18d40 100644 --- i/src/test/perl/PostgreSQL/Test/Utils.pm +++ w/src/test/perl/PostgreSQL/Test/Utils.pm @@ -310,6 +310,8 @@ The returned path uses forward slashes but has no trailing slash. sub perl2host { my ($subject) = @_; + # FIXME: to be sure this doesn't do anything + return $subject; return $subject unless $Config{osname} eq 'msys'; if ($is_msys2) {