From 73dedecbb3367304f5791e7aacfa008551725cee Mon Sep 17 00:00:00 2001 From: Sertonix Date: Fri, 20 Mar 2026 18:42:01 +0100 Subject: [PATCH] Catch exceptions in test wrapper --- check.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/check.py b/check.py index 0618c59c5e6..65acac416fc 100755 --- a/check.py +++ b/check.py @@ -419,7 +419,12 @@ def test_suite(name, func): @functools.wraps(func) def wrapper(*args, **kwargs): assert not (shared.options.abort_on_first_failure and shared.num_failures) - result = func(*args, **kwargs) + try: + result = func(*args, **kwargs) + except Exception as e: + print(e) + shared.num_failures += 1 + result = None if shared.options.abort_on_first_failure and shared.num_failures: raise Exception(f'test suite failed: {name}') return result