summaryrefslogtreecommitdiffstats
path: root/tests/deckard/tools/parse.py
blob: 139b2841b1b6c5cce587f72dbb48ee819aeecb97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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()