diff options
Diffstat (limited to '')
-rw-r--r-- | tests/deckard/tools/parse.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/deckard/tools/parse.py b/tests/deckard/tools/parse.py new file mode 100644 index 0000000..139b284 --- /dev/null +++ b/tests/deckard/tools/parse.py @@ -0,0 +1,21 @@ +"""Returns 0 if the test is parsed, 1 if not.""" + +import sys +import os +import argparse +import pydnstest +import pydnstest.scenario + + +def main(): + """Returns 0 if the test is parsed, 1 if not.""" + argparser = argparse.ArgumentParser() + argparser.add_argument("file") + args = argparser.parse_args() + if pydnstest.scenario.parse_file(os.path.realpath(args.file)): + sys.exit(0) + else: + sys.exit(1) + + +main() |