Skip to content

Commit 2ae17e4

Browse files
feedback
Created using spr 1.3.6
1 parent 0bfe954 commit 2ae17e4

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

llvm/test/MC/COFF/stdin.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,30 @@
11
# RUN: echo "// comment" > %t.input
2-
# RUN: which llvm-mc | %python %s %t
2+
# RUN: which llvm-mc | %python %s %t.input %t
33

44
import argparse
55
import subprocess
66
import sys
77

88
parser = argparse.ArgumentParser()
9+
parser.add_argument("input_file")
910
parser.add_argument("temp_file")
1011
arguments = parser.parse_args()
1112

1213
llvm_mc_binary = sys.stdin.readlines()[0].strip()
13-
temp_file = arguments.temp_file
14-
input_file = temp_file + ".input"
1514

16-
with open(temp_file, "w") as mc_stdout:
15+
with open(arguments.temp_file, "w") as mc_stdout:
1716
## We need to test that starting on an input stream with a non-zero offset
1817
## does not trigger an assertion in WinCOFFObjectWriter.cpp, so we seek
1918
## past zero for STDOUT.
2019
mc_stdout.seek(4)
2120
subprocess.run(
22-
[llvm_mc_binary, "-filetype=obj", "-triple", "i686-pc-win32", input_file],
21+
[
22+
llvm_mc_binary,
23+
"-filetype=obj",
24+
"-triple",
25+
"i686-pc-win32",
26+
arguments.input_file,
27+
],
2328
stdout=mc_stdout,
2429
check=True,
2530
)

0 commit comments

Comments
 (0)