| import sys | |
| import getopt | |
| from autogen import main | |
| if __name__ == '__main__': | |
| try: | |
| opts, args = getopt.getopt(sys.argv[1:], "tl:p:") | |
| except getopt.GetoptError: | |
| print("Example of command") | |
| print("run autogen_test: run.py -t -p <outPath>") | |
| print("run autogen_main: run.py -p <outPath>") | |
| sys.exit(2) | |
| run = 0 | |
| for opt, arg in opts: | |
| if opt == "-t": | |
| run |= 1 << 0 | |
| elif opt == "-p": | |
| run |= 1 << 1 | |
| out_path = arg | |
| if run & 0x3 == 0x3: | |
| from tests import test_suite | |
| test_suite.main(out_path) | |
| elif run & 0x2 == 0x2: | |
| main.main(out_path) | |
| else: | |
| print("Example of command") | |
| print("run autogen_test: run.py -t -p <outPath>") | |
| print("run autogen_main: run.py -p <outPath>") | |