[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / tools / llvm-reduce / Inputs / sleep-and-check-stores.py
blobc5a6cf7b52157697fad70f2dd4b6ea581520f8ee
1 #!/bin/python
3 import time
4 import sys
6 sleep_seconds = int(sys.argv[1])
7 num_stores = int(sys.argv[2])
8 file_input = sys.argv[3]
10 try:
11 input = open(file_input, "r")
12 except Exception as err:
13 print(err, file=sys.stderr)
14 sys.exit(1)
16 InterestingStores = 0
17 for line in input:
18 if "store" in line:
19 InterestingStores += 1
21 print("Interesting stores ", InterestingStores, " sleeping ", sleep_seconds)
22 time.sleep(sleep_seconds)
25 if InterestingStores > num_stores:
26 sys.exit(0) # interesting!
28 sys.exit(1) # IR isn't interesting