[ARM] Adjust how NEON shifts are lowered
[llvm-core.git] / test / tools / llvm-symbolizer / Inputs / flush-output.py
blob120d49226fa9a302ed8ed527bcc7441ae7a130f1
1 from __future__ import print_function
2 import os
3 import subprocess
4 import sys
5 import threading
7 def kill_subprocess(process):
8 process.kill()
9 os._exit(1)
11 # Pass -f=none and --output-style=GNU to get only one line of output per input.
12 cmd = subprocess.Popen([sys.argv[1],
13 '--obj=' + sys.argv[2],
14 '-f=none',
15 '--output-style=GNU'], stdout=subprocess.PIPE, stdin=subprocess.PIPE)
16 watchdog = threading.Timer(20, kill_subprocess, args=[cmd])
17 watchdog.start()
18 cmd.stdin.write(b'0\n')
19 cmd.stdin.flush()
20 print(cmd.stdout.readline())
21 cmd.stdin.write(b'bad\n')
22 cmd.stdin.flush()
23 print(cmd.stdout.readline())
24 watchdog.cancel()