Content-Length: 289920 | pFad | http://github.com/postgrespro/postgres/commit/22a4b104ba70f6f486197ab28a28cd9bcdd4f4ad

C2 Make TAP todo_start effects the same under Meson and prove_check. · postgrespro/postgres@22a4b10 · GitHub
Skip to content

Commit 22a4b10

Browse files
committed
Make TAP todo_start effects the same under Meson and prove_check.
This could have caused spurious failures only on SPARC Linux, because today's only todo_start tests for that platform. Back-patch to v16, where Meson support first appeared. Reviewed by Robert Haas. Discussion: https://postgr.es/m/20240512232923.aa.nmisch@google.com
1 parent 473a352 commit 22a4b10

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

src/tools/testwrap

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,22 @@ env_dict = {**os.environ,
4141
'TESTDATADIR': os.path.join(testdir, 'data'),
4242
'TESTLOGDIR': os.path.join(testdir, 'log')}
4343

44-
sp = subprocess.run(args.test_command, env=env_dict)
45-
46-
if sp.returncode == 0:
44+
sp = subprocess.Popen(args.test_command, env=env_dict, stdout=subprocess.PIPE)
45+
# Meson categorizes a passing TODO test point as bad
46+
# (https://github.com/mesonbuild/meson/issues/13183). Remove the TODO
47+
# directive, so Meson computes the file result like Perl does. This could
48+
# have the side effect of delaying stdout lines relative to stderr. That
49+
# doesn't affect the log file, and the TAP protocol uses stdout only.
50+
for line in sp.stdout:
51+
if line.startswith(b'ok '):
52+
line = line.replace(b' # TODO ', b' # testwrap-overridden-TODO ', 1)
53+
sys.stdout.buffer.write(line)
54+
returncode = sp.wait()
55+
56+
if returncode == 0:
4757
print('# test succeeded')
4858
open(os.path.join(testdir, 'test.success'), 'x')
4959
else:
5060
print('# test failed')
5161
open(os.path.join(testdir, 'test.fail'), 'x')
52-
sys.exit(sp.returncode)
62+
sys.exit(returncode)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/22a4b104ba70f6f486197ab28a28cd9bcdd4f4ad

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy