Skip to content

Commit ddf2997

Browse files
committed
[test] Align behavior of interrupts.test on different platforms
The test llvm/Support/interrupts.test behaves differently on Linux and Windows. On Linux the function 'run_wrapper' runs process with stderr connected to pipe, while on Windows stderr is mapped to stderr of the running script. When no output was made to stderr, this difference was not observable. The new version of llvm-symbolizer (https://reviews.llvm.org/D149759) complains about missing binary file, so stderr is not empty anymore and the test fails on Windows and passes on Linux.
1 parent dddd0c2 commit ddf2997

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llvm/test/Support/interrupts.test

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ import sys
1010
import time
1111

1212
def run_symbolizer():
13-
proc = subprocess.Popen([sys.argv[2]], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
13+
proc = subprocess.Popen([sys.argv[2]], stdout=subprocess.PIPE,
14+
stdin=subprocess.PIPE, stderr=sys.stderr)
1415
# Write then read some output to ensure the process has started fully.
1516
proc.stdin.write(b'foo bar\n')
1617
proc.stdin.flush()
@@ -34,8 +35,8 @@ def run_wrapper():
3435
startupinfo=startupinfo,
3536
creationflags=subprocess.CREATE_NEW_CONSOLE)
3637
else:
37-
proc = subprocess.Popen(args,
38-
stderr=subprocess.PIPE)
38+
proc = subprocess.Popen(args, stderr=sys.stderr)
39+
proc.wait()
3940

4041
if sys.argv[1] == 'wrapper':
4142
run_wrapper()

0 commit comments

Comments
 (0)