diff options
author | Jack Lloyd <[email protected]> | 2019-06-08 08:42:06 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2019-06-08 08:42:06 -0400 |
commit | 097feb96b174a998fa78e2f6f040d62808f10204 (patch) | |
tree | 0791e1c956c22e5bae0272aeae6cbcaacbac846e | |
parent | 762a76edc0240d3028ed17b9fb6e394ab3eac6cf (diff) |
Prevent exception from taking down entire test script
-rwxr-xr-x | src/scripts/test_cli.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/scripts/test_cli.py b/src/scripts/test_cli.py index 5c976adb0..3c8376ba2 100755 --- a/src/scripts/test_cli.py +++ b/src/scripts/test_cli.py @@ -1052,7 +1052,11 @@ def main(args=None): start = time.time() tmp_dir = tempfile.mkdtemp(prefix='botan_cli_') - fn(tmp_dir) + try: + fn(tmp_dir) + except Exception as e: # pylint: disable=broad-except + logging.error("Test %s threw exception: %s", fn_name, e) + shutil.rmtree(tmp_dir) end = time.time() logging.debug("Ran %s in %.02f", fn_name, end-start) |