[NFC][RemoveDIs] Prefer iterators over inst-pointers in InstCombine
[llvm-project.git] / llvm / test / tools / llvm-debuginfod-find / Inputs / capture_req.py
blobfa823e61f93979cd9e76a5bd8ad343cf1be1617b
1 import http.server
2 import os
3 import subprocess
4 import sys
5 import threading
8 class TrivialHandler(http.server.BaseHTTPRequestHandler):
9 def do_GET(self):
10 self.send_response(501)
12 def log_request(self, *args, **kwargs):
13 print(self.requestline)
14 print(self.headers)
17 httpd = http.server.HTTPServer(("", 0), TrivialHandler)
18 port = httpd.socket.getsockname()[1]
20 try:
21 t = threading.Thread(target=httpd.serve_forever).start()
22 os.environ["DEBUGINFOD_URLS"] = f"http://localhost:{port}"
23 subprocess.run(sys.argv[1:], capture_output=True)
24 finally:
25 httpd.shutdown()