blob: 26521a1498c851657b3881bf89fe7b9567684c17 [file] [log] [blame]
yu.dongc33b3072024-08-21 23:14:49 -07001import sys
2import getopt
3from autogen import main
4
5
6if __name__ == '__main__':
7 try:
8 opts, args = getopt.getopt(sys.argv[1:], "tl:p:")
9 except getopt.GetoptError:
10 print("Example of command")
11 print("run autogen_test: run.py -t -p <outPath>")
12 print("run autogen_main: run.py -p <outPath>")
13 sys.exit(2)
14 run = 0
15 for opt, arg in opts:
16 if opt == "-t":
17 run |= 1 << 0
18 elif opt == "-p":
19 run |= 1 << 1
20 out_path = arg
21 if run & 0x3 == 0x3:
22 from tests import test_suite
23 test_suite.main(out_path)
24 elif run & 0x2 == 0x2:
25 main.main(out_path)
26 else:
27 print("Example of command")
28 print("run autogen_test: run.py -t -p <outPath>")
29 print("run autogen_main: run.py -p <outPath>")
30
31
32