public inbox for [email protected]  
help / color / mirror / Atom feed
From: Bertrand Drouvot <[email protected]>
Subject: [PATCH v1] testwrap: support EXTRA_REGRESS_OPTS environment variable
Date: Thu, 23 Apr 2026 05:01:13 +0000

With autoconf, EXTRA_REGRESS_OPTS can be used to pass additional flags to
pg_regress, pg_isolation_regress, and pg_regress_ecpg. For example:

EXTRA_REGRESS_OPTS="--use-existing" make installcheck

There was no meson equivalent. The TESTS environment variable could not be
used for this purpose because setting it replaces the schedule entirely,
so passing only flags (e.g., TESTS="--use-existing") resulted in no tests
being run.

Add 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

Author: Bertrand Drouvot <[email protected]>
---
 src/tools/testwrap | 3 +++
 1 file changed, 3 insertions(+)
 100.0% src/tools/

diff --git a/src/tools/testwrap b/src/tools/testwrap
index e91296ecd15..8c44f9bc2d6 100755
--- a/src/tools/testwrap
+++ b/src/tools/testwrap
@@ -61,6 +61,9 @@ else:
     if args.tests:
         args.test_command.extend(args.tests)
 
+if "EXTRA_REGRESS_OPTS" in env_dict and args.testname in ('regress', 'isolation', 'ecpg'):
+    args.test_command += env_dict["EXTRA_REGRESS_OPTS"].split()
+
 sp = subprocess.Popen(args.test_command, env=env_dict, stdout=subprocess.PIPE)
 # Meson categorizes a passing TODO test point as bad
 # (https://github.com/mesonbuild/meson/issues/13183).  Remove the TODO
-- 
2.34.1


--3WyonmA85JeTPG5k--





view thread (277+ 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]
  Subject: Re: [PATCH v1] testwrap: support EXTRA_REGRESS_OPTS environment variable
  In-Reply-To: <no-message-id-284870@localhost>

* 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