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: https://www.postgresql.org/message-id/20240323000336.eepe6hmiglapzmp6%40awork3.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
0001-meson-Honor-executable-wrappers-for-regression-tests.patch
Description: Binary data
0002-meson-Run-ECPG-tests-in-runnable-cross-builds.patch
Description: Binary data
