Gian Marco Iodice | 5c093c0 | 2019-10-14 15:38:38 +0100 | [diff] [blame] | 1 | import argparse |
| 2 | import TestScripts.NewParser as parse |
| 3 | import pickle |
| 4 | |
| 5 | parser = argparse.ArgumentParser(description='Parse test description') |
| 6 | |
| 7 | parser.add_argument('-f', nargs='?',type = str, default=None, help="Test description file path") |
| 8 | |
| 9 | parser.add_argument('-o', nargs='?',type = str, default="Output.pickle", help="output file for parsed description") |
| 10 | |
| 11 | args = parser.parse_args() |
| 12 | |
| 13 | if 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) |