parse.py 434 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
"""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)

Tomas Krizek's avatar
Tomas Krizek committed
20

21
main()