tests/run-tests.py: Give more information when CPython crashes.
To make it easier to diagnose why CPython crashed. Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
@@ -955,8 +955,8 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
|
|||||||
cwd=os.path.dirname(test_file),
|
cwd=os.path.dirname(test_file),
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
)
|
)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError as er:
|
||||||
output_expected = b"CPYTHON3 CRASH"
|
output_expected = b"CPYTHON3 CRASH:\n" + er.output
|
||||||
|
|
||||||
# Canonical form for all host platforms is to use \n for end-of-line.
|
# Canonical form for all host platforms is to use \n for end-of-line.
|
||||||
output_expected = output_expected.replace(b"\r\n", b"\n")
|
output_expected = output_expected.replace(b"\r\n", b"\n")
|
||||||
|
|||||||
Reference in New Issue
Block a user