Skip to content
Merged
30 changes: 30 additions & 0 deletions llvm/test/MC/COFF/stdin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# RUN: echo "// comment" > %t.input
# RUN: which llvm-mc | %python %s %t.input %t

import argparse
import subprocess
import sys

parser = argparse.ArgumentParser()
parser.add_argument("input_file")
parser.add_argument("temp_file")
arguments = parser.parse_args()

llvm_mc_binary = sys.stdin.readlines()[0].strip()

with open(arguments.temp_file, "w") as mc_stdout:
## We need to test that starting on an input stream with a non-zero offset
## does not trigger an assertion in WinCOFFObjectWriter.cpp, so we seek
## past zero for STDOUT.
mc_stdout.seek(4)
subprocess.run(
[
llvm_mc_binary,
"-filetype=obj",
"-triple",
"i686-pc-win32",
arguments.input_file,
],
stdout=mc_stdout,
check=True,
)
3 changes: 0 additions & 3 deletions llvm/test/MC/COFF/stdin.s

This file was deleted.

4 changes: 2 additions & 2 deletions llvm/test/tools/not/disable-symbolization.test
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# When building on Windows under cmd.exe and GnuWin32, 'env' fails if no
# arguments are provided.
# UNSUPPORTED: system-windows
# RUN: not --crash env > %t || true
# RUN: cmp -s %t /dev/null || FileCheck %s < %t
# RUN: not --crash bash -c env > %t || true
# RUN: FileCheck %s < %t

# CHECK-DAG: LLVM_DISABLE_CRASH_REPORT=1
# CHECK-DAG: LLVM_DISABLE_SYMBOLIZATION=1
Loading