Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit22a4b10

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, becausetoday'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 parent473a352 commit22a4b10

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-
ifsp.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+
forlineinsp.stdout:
51+
ifline.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+
ifreturncode==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)

[8]ページ先頭

©2009-2025 Movatter.jp