diff options
Diffstat (limited to '')
-rw-r--r-- | test/cavp.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/cavp.py b/test/cavp.py index b8513e8..87c582f 100644 --- a/test/cavp.py +++ b/test/cavp.py @@ -216,9 +216,10 @@ def run_tests(archive_path, tools_path=(), use_sde=False, use_boxes=False, log_p else: return 1 -def _parse_args(args=sys.argv): +def _parse_args(args=None): + if args is None: + args = sys.argv[1:] parser = argparse.ArgumentParser() - parser.add_argument('--path', '-p', dest='tools_path', metavar='PATH', nargs='*', help='set block encryption utilities directory path') @@ -231,10 +232,9 @@ def _parse_args(args=sys.argv): help='set test vectors archive file path') parser.add_argument('--log', '-l', dest='log_path', metavar='PATH', help='set log file path') + return parser.parse_args(args) - return parser.parse_args(args[1:]) - -def main(args=sys.argv): +def main(args=None): args = _parse_args(args) return run_tests(**vars(args)) |