diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:55:53 +0000 |
commit | 3d0386f27ca66379acf50199e1d1298386eeeeb8 (patch) | |
tree | f87bd4a126b3a843858eb447e8fd5893c3ee3882 /tests/deckard/tools/parse.py | |
parent | Initial commit. (diff) | |
download | knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.tar.xz knot-resolver-3d0386f27ca66379acf50199e1d1298386eeeeb8.zip |
Adding upstream version 3.2.1.upstream/3.2.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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() |