postgres icon indicating copy to clipboard operation
postgres copied to clipboard

meson: write test for pkg-config based extension builds

Open anarazel opened this issue 3 years ago • 2 comments

We now generate postgresql-extension.pc and postgresql-extension-warnings-uninstalled.pc, containing the correct flags to build an extension fairly easily, without otherwise using postgres' build infrastructure. I manually tested this on linux and windows, but we should have automated tests for this.

Likely just as part of our normal testsuite. If we do that, it might also be worth writing a test for building the same extension via pgxs.

My manual tests were just: build against (pseudo-)installed postgres:

PKG_CONFIG_SYSROOT_DIR=/tmp/meson/tmp_install PKG_CONFIG_PATH=/tmp/meson/tmp_install/tmp/meson-install/lib/x86_64-linux-gnu/pkgconfig/ m setup build 
ninja -C build -v

build against postgres build tree:

PKG_CONFIG_PATH=/tmp/meson/meson-uninstalled m setup build --wipe && ninja -C build -v
ninja -C build -v

on windows with msvc it likely would be worth testing both --buildtype vs and --buildtype ninja

anarazel avatar Aug 09 '22 18:08 anarazel

Likely just as part of our normal testsuite.

Did you mean adding these tests to the current testsuite implementation or adding these tests to '.cirrus.yml' as a 'script'?

nbyavuz avatar Sep 13 '22 12:09 nbyavuz

Did you mean adding these tests to the current testsuite implementation or adding these tests to '.cirrus.yml' as a 'script'?

The former.

anarazel avatar Sep 13 '22 17:09 anarazel