public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bertrand Drouvot <[email protected]>
To: [email protected]
Subject: meson/testwrap: support EXTRA_REGRESS_OPTS environment variable
Date: Thu, 23 Apr 2026 13:05:52 +0000
Message-ID: <aeoZMJxXLpZgla4P@bdtpg> (raw)

Hi hackers,

While looking at [1], I did use the pg_regress --use-existing flag that way:

TESTS="test_setup create_index memoize --use-existing" meson test -C meson_build --setup running --suite regress-running

and that produced the desired outcome (i.e running those 3 tests from the regress
suite on a running instance and existing regression database).

That was kind of a trick and not surprisingly when I wanted to run the entire
regress suite that way:

TESTS="--use-existing" meson test -C meson_build --setup running --suite regress-running

things did not work as expected and produced:

1/1 regress-running - postgresql:regress-running/regress        SKIP              0.04s

Ok:                0
Fail:              0
Skipped:           1

means it skipped the tests.

OTOH, with autoconf, one could run:

EXTRA_REGRESS_OPTS="--use-existing" make installcheck

and that would work as expected (means running the entire regress suite on an
existing regression database).

So it looks like that currently (unless I missed it), with meson, it is not
possible to run an entire test suite on a running instance and existing regression
database.

Indeed, setting the TESTS environment variable replaces the schedule and test
list entirely. This means that passing only pg_regress flags (e.g.,
TESTS="--use-existing") results in no tests being run, since no schedule or test
names are included.

The attached patch adds support for EXTRA_REGRESS_OPTS in testwrap. When set,
its contents are appended to the test command for regress, isolation, and ecpg
test types, matching autoconf behavior.

This enables running the full schedule with extra pg_regress options, like:

EXTRA_REGRESS_OPTS="--use-existing" meson test --setup running --suite regress-running

Once we agree on a fix and that fix is pushed, I think it would make sense
to add an example in [2].

[1]: https://postgr.es/m/aekGK/SUIeW5n5fY%40bdtpg
[2]: https://wiki.postgresql.org/wiki/Meson

Regards,

-- 
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com


view thread (3+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: meson/testwrap: support EXTRA_REGRESS_OPTS environment variable
  In-Reply-To: <aeoZMJxXLpZgla4P@bdtpg>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox