Skip to content

Commit d95b67a

Browse files
jeltzCommitfest Bot
authored and
Commitfest Bot
committed
meson: Add support for EXTRA_REGRESS_OPTS
Add support for the EXTRA_REGRESS_OPTS environment variable in meson which works just like with make and applies to all regress, ecpg and isolation tests. TAP tests which support it under make will continue to support the option. Run it with e.g: EXTRA_REGRESS_OPTS="--temp-config=test.conf" meson test
1 parent 0dca5d6 commit d95b67a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/tools/testwrap

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import argparse
44
import shutil
5+
import shlex
56
import subprocess
67
import os
78
import sys
@@ -51,7 +52,12 @@ env_dict = {**os.environ,
5152
if "PG_TEST_EXTRA" not in env_dict and args.pg_test_extra:
5253
env_dict["PG_TEST_EXTRA"] = args.pg_test_extra
5354

54-
sp = subprocess.Popen(args.test_command, env=env_dict, stdout=subprocess.PIPE)
55+
if args.testname in ['regress', 'isolation', 'ecpg'] and 'EXTRA_REGRESS_OPTS' in env_dict:
56+
test_command = args.test_command + shlex.split(env_dict['EXTRA_REGRESS_OPTS'])
57+
else:
58+
test_command = args.test_command
59+
60+
sp = subprocess.Popen(test_command, env=env_dict, stdout=subprocess.PIPE)
5561
# Meson categorizes a passing TODO test point as bad
5662
# (https://github.com/mesonbuild/meson/issues/13183). Remove the TODO
5763
# directive, so Meson computes the file result like Perl does. This could

0 commit comments

Comments
 (0)