From 373c0724c9de1b82f29f86c1a643dcb0169a01bc Mon Sep 17 00:00:00 2001 From: Pieter De Gendt Date: Thu, 17 Jul 2025 09:43:45 +0200 Subject: [PATCH] scripts: ci: check_compliance: Capture failing tests If a compliance test itself throws an exception, the entire script is aborted. Update this by capturing the exception and failing only the test itself. Signed-off-by: Pieter De Gendt --- scripts/ci/check_compliance.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/ci/check_compliance.py b/scripts/ci/check_compliance.py index 8a12f6f2d0e..a647781e5ec 100755 --- a/scripts/ci/check_compliance.py +++ b/scripts/ci/check_compliance.py @@ -2195,6 +2195,8 @@ def _main(args): test.run() except EndTest: pass + except BaseException: + test.failure(f"An exception occurred in {test.name}:\n{traceback.format_exc()}") # Annotate if required if args.annotate: