[PATCH v1 0/2] meson: Support ECPG tests in runnable cross builds
PostgreSQL’s Meson build currently skips the ECPG test targets in every
cross-build. This also excludes configurations where the build machine can
run host binaries, such as x64 Windows binaries running directly on Windows
ARM64 with needs_exe_wrapper=false.
meson.can_run_host_binaries() covers both direct execution and execution
through a configured wrapper. Patch 1 makes the regression test harness
wrapper-aware, ensuring that this check does not enable a broken wrapper
path. Patch 2 uses the check for the ECPG guard.
There was a prior pgsql-hackers discussion about Windows cross-builds on
ARM64 in which Andres suggested using a cross file with
needs_exe_wrapper=false:
/messages/by-id/20240323000336.eepe6hmiglapzmp6@awork3.anarazel.de
I did not find an existing proposal addressing the ECPG test guard.
I tested the patches with Meson 1.11.2 and MSVC 19.44 on Windows 11 ARM64:
-
Native ARM64: 67 ECPG subtests passed
-
x64 cross-build with needs_exe_wrapper=false: 67 subtests passed
-
x64 cross-build with a Python executable wrapper: 67 subtests passed,
and the wrapper log included ECPG generation and pg_regress_ecpg
-
x64 cross-build requiring a wrapper but with none configured:
ECPG-generated targets remained disabled
Best,
Harrison