From 372ecfef02eccc4e52a5d0abef068c7d25fc4315 Mon Sep 17 00:00:00 2001 From: Damien George Date: Tue, 21 Jan 2025 00:56:59 +1100 Subject: [PATCH] tests/run-tests.py: Give more information when CPython crashes. To make it easier to diagnose why CPython crashed. Signed-off-by: Damien George --- tests/run-tests.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/run-tests.py b/tests/run-tests.py index 1df1b35d2..b108b1639 100755 --- a/tests/run-tests.py +++ b/tests/run-tests.py @@ -955,8 +955,8 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1): cwd=os.path.dirname(test_file), stderr=subprocess.STDOUT, ) - except subprocess.CalledProcessError: - output_expected = b"CPYTHON3 CRASH" + except subprocess.CalledProcessError as er: + output_expected = b"CPYTHON3 CRASH:\n" + er.output # Canonical form for all host platforms is to use \n for end-of-line. output_expected = output_expected.replace(b"\r\n", b"\n")