From 0f4d492db8a9cd883ea02ab3586b8733645334b7 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Thu, 6 Jan 2022 11:09:35 -0600 Subject: [PATCH] runner: convert runtime exceptions to TestError Convert exceptions from code errors (well, any unexpected exception) into a TestError. This allows the test to be reported as failed. I think because tests are run in separate processes, its harder to catch these sorts of errors. --- run.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run.py b/run.py index d5440343d..91f628cd6 100755 --- a/run.py +++ b/run.py @@ -163,6 +163,8 @@ def handle_exceptions(func): if args and not args[0].quiet: print("===> {}: Sub test #{}: SKIPPED : {}".format(kwargs["test_name"], kwargs["test_num"], ue)) kwargs["count"]["skipped"] += 1 + except Exception as err: + raise TestError("Internal runtime error: {}".format(err)) else: if result: kwargs["count"]["success"] += 1 -- 2.47.2