1import argparse 2import TestScripts.NewParser as parse 3import pickle 4 5parser = argparse.ArgumentParser(description='Parse test description') 6 7parser.add_argument('-f', nargs='?',type = str, default=None, help="Test description file path") 8 9parser.add_argument('-o', nargs='?',type = str, default="Output.pickle", help="output file for parsed description") 10 11args = parser.parse_args() 12 13if args.f is not None: 14 p = parse.Parser() 15 # Parse the test description file 16 root = p.parse(args.f) 17 with open(args.o,"wb") as output: 18 pickle.dump(root, output) 19