how to run the equivalent of 'make install check-world' with meson
Hello,
I'm tring to run the equivalent of "make installcheck-world" with meson.
According to https://wiki.postgresql.org/wiki/Meson?utm_source=chatgpt.com:
I have tried:
meson test -C build -q --print-errorlogs --setup running
But these tests fails because it looks like that test extensions are not
installed:
# step s1exec: LOAD 'delay_execution';
# SET delay_execution.post_planning_lock_id = 12345;
# - SELECT * FROM foo WHERE a <> 1 AND a <> (SELECT 3);
<waiting ...>
# + SELECT * FROM foo WHERE a <> 1 AND a <> (SELECT 3);
# +ERROR: could not access file "delay_execution": No such file or
directory
-- Tests for relation options
# CREATE EXTENSION dummy_index_am;
# +ERROR: extension "dummy_index_am" is not available
# +HINT: The extension must first be installed on the system where
PostgreSQL is running.
CREATE EXTENSION dummy_seclabel;
# +ERROR: extension "dummy_seclabel" is not available
# +HINT: The extension must first be installed on the system where
PostgreSQL is running.
Here is the full script that I'm using :
export PGDATA=/var/lib/pgsql/data
export TARGET=/var/lib/pgsql/local
set -x
#
rm -rf build
make distclean
meson setup build --prefix=$TARGET --buildtype=debug -Dcassert=true
-Duuid=e2fs -Dssl=openssl -Dtap_tests=enabled -Dliburing=enabled
cd build
ninja
#
rm -rf $TARGET
mkdir $TARGET
#
ninja install
#
export PATH=$TARGET/bin:$PATH
#
pg_ctl stop
rm -rf $PGDATA
initdb
#
echo "logging_collector = on" > $PGDATA/mypg.conf
echo "log_directory = 'log'" >> $PGDATA/mypg.conf
echo "log_filename = 'pg.log'" >> $PGDATA/mypg.conf
echo "include = 'mypg.conf'" >> $PGDATA/postgresql.conf
#
pg_ctl -D $PGDATA -l logfile start
#
cd ..
meson test -C build -q --print-errorlogs --setup running
Regards,
PF
Hi,
On 2026-08-26 16:33:46 +0200, Pierre Forstmann wrote:
I'm tring to run the equivalent of "make installcheck-world" with meson.
According to https://wiki.postgresql.org/wiki/Meson?utm_source=chatgpt.com:
I have tried:
meson test -C build -q --print-errorlogs --setup running
But these tests fails because it looks like that test extensions are not
installed:
If you want to have the "test only extensions" installed, you need to do
"ninja install-test-files". They otherwise do not get installed - many of them
are in fact *NOT SAFE* to install in an installation that's used for anything
other than testing. Not required e.g. for the the base regression tests, as
they don't require test-only extensions.
Greetings,
Andres Freund
OK this has worked. Thank you.
Regards,
PF
Le 26/08/2026 à 16:52, Andres Freund a écrit :
Show quoted text
Hi,
On 2026-08-26 16:33:46 +0200, Pierre Forstmann wrote:
I'm tring to run the equivalent of "make installcheck-world" with meson.
According to https://wiki.postgresql.org/wiki/Meson?utm_source=chatgpt.com:
I have tried:
meson test -C build -q --print-errorlogs --setup running
But these tests fails because it looks like that test extensions are not
installed:If you want to have the "test only extensions" installed, you need to do
"ninja install-test-files". They otherwise do not get installed - many of them
are in fact *NOT SAFE* to install in an installation that's used for anything
other than testing. Not required e.g. for the the base regression tests, as
they don't require test-only extensions.Greetings,
Andres Freund