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

Commit2884269

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 parent07d66d3 commit2884269

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
@@ -36,12 +36,22 @@ env_dict = {**os.environ,
3636
'TESTDATADIR':os.path.join(testdir,'data'),
3737
'TESTLOGDIR':os.path.join(testdir,'log')}
3838

39-
sp=subprocess.run(args.test_command,env=env_dict)
40-
41-
ifsp.returncode==0:
39+
sp=subprocess.Popen(args.test_command,env=env_dict,stdout=subprocess.PIPE)
40+
# Meson categorizes a passing TODO test point as bad
41+
# (https://github.com/mesonbuild/meson/issues/13183). Remove the TODO
42+
# directive, so Meson computes the file result like Perl does. This could
43+
# have the side effect of delaying stdout lines relative to stderr. That
44+
# doesn't affect the log file, and the TAP protocol uses stdout only.
45+
forlineinsp.stdout:
46+
ifline.startswith(b'ok '):
47+
line=line.replace(b' # TODO ',b' # testwrap-overridden-TODO ',1)
48+
sys.stdout.buffer.write(line)
49+
returncode=sp.wait()
50+
51+
ifreturncode==0:
4252
print('# test succeeded')
4353
open(os.path.join(testdir,'test.success'),'x')
4454
else:
4555
print('# test failed')
4656
open(os.path.join(testdir,'test.fail'),'x')
47-
sys.exit(sp.returncode)
57+
sys.exit(returncode)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp