Commit 31207195 authored by Ondřej Zajíček's avatar Ondřej Zajíček
Browse files

Runtest: Propagate errors as return value

Also, remove 'batch' mode as no longer needed.
parent f35de795
#!/usr/bin/env python3
import os
import sys
import argparse
import tests.base as t
parser = argparse.ArgumentParser()
parser.add_argument("-m", choices=["save", "check"])
parser.add_argument("testdir", nargs="*")
parser.parse_args("testdir".split())
args = parser.parse_args()
def main():
for protocol in args.testdir:
success = t.init(protocol, args.m == "save")
if not success:
break
success = t.run()
if not success and not BATCH:
break
t.cleanup()
for testdir in args.testdir:
success = t.init(testdir, args.m == "save")
if not success:
sys.exit(1)
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("-m", choices=["save", "check", "batch"])
parser.add_argument("testdir", nargs="*")
parser.parse_args("testdir".split())
args = parser.parse_args()
BATCH = args.m == "batch"
main()
success = t.run()
if not success:
sys.exit(1)
t.cleanup()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment