[PATCH v1 0/2] meson: Support ECPG tests in runnable cross builds

Started by Harrison Booth4 months ago3 messageshackers
Jump to latest
#1Harrison Booth
harrisontbooth@gmail.com

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

Attachments:

t253205_1
0001-meson-Honor-executable-wrappers-for-regression-tests.patchapplication/octet-stream; name=0001-meson-Honor-executable-wrappers-for-regression-tests.patchDownload+15-3
0002-meson-Run-ECPG-tests-in-runnable-cross-builds.patchapplication/octet-stream; name=0002-meson-Run-ECPG-tests-in-runnable-cross-builds.patchDownload+2-3
#2Harrison Booth
harrisontbooth@gmail.com
In reply to: Harrison Booth (#1)
Re: [PATCH v2] meson: Support ECPG tests in runnable cross builds

Attached is v2 rebased on master at 8e82d6610e7. It combines
executable-wrapper support in the regression harness with the
meson.can_run_host_binaries() guard for ECPG tests.

Configuration checks found 135 ECPG targets for native ARM64, directly
runnable x64, and x64 with a Python wrapper; zero were exposed when a
required wrapper was missing. ECPG generation of thread/alloc.c
through the wrapper passed, as did direct and quoted-wrapper
regression-harness smoke checks.

Full ARM64 and x64 builds passed. ECPG passed all 66 subtests on
native ARM64 and directly runnable x64 under ARM64 emulation. The
ARM64 rerun passed after adding the missing diff tool to PATH. These
results do not establish full database regression coverage through the
Python wrapper.

Could someone review the wrapper handling and ECPG guard?

A separate GitHub-hosted Windows x64 build and all nine test groups
passed with all three patches applied. ECPG passed all 66 subtests on
the GitHub Windows x64 runner.

Best,
Harrison

Attachments:

t253205_2
v2-0001-meson-Support-ECPG-tests-in-runnable-cross-builds.patchtext/x-diff; charset=utf-8; name=v2-0001-meson-Support-ECPG-tests-in-runnable-cross-builds.patchDownload+17-4
#3Harrison Booth
harrisontbooth@gmail.com
In reply to: Harrison Booth (#2)
Re: [PATCH v2] meson: Support ECPG tests in runnable cross builds

The full ECPG regression run through a required wrapper now passes for
v2. On GitHub's Windows x64 and ARM64 runners, the original
three-patch integration at 8e82d6610e7 passes all 66 subtests and
three setup groups with Meson 1.11.2.

Both builds target x64 with needs_exe_wrapper=true and a Python
wrapper in a path with spaces. The ARM64 host executes x64 through
Windows emulation.

Invocation logs confirm ECPG generation and pg_regress_ecpg both use
the wrapper. Omitting the required wrapper leaves ECPG test targets
disabled. No patch changes were needed.

Best,

Harrison