tests/run-tests.py: Capture output of stderr when running on CPython.

Signed-off-by: stephanelsmith <stephane.smith@titansensor.com>
This commit is contained in:
stephanelsmith 2023-07-26 02:52:56 +00:00 committed by Damien George
parent a64f2fdca0
commit 633599cdd5
1 changed files with 3 additions and 1 deletions

View File

@ -709,7 +709,9 @@ def run_tests(pyb, tests, args, result_dir, num_threads=1):
# run CPython to work out expected output # run CPython to work out expected output
try: try:
output_expected = subprocess.check_output( output_expected = subprocess.check_output(
CPYTHON3_CMD + [os.path.abspath(test_file)], cwd=os.path.dirname(test_file) CPYTHON3_CMD + [os.path.abspath(test_file)],
cwd=os.path.dirname(test_file),
stderr=subprocess.STDOUT,
) )
if args.write_exp: if args.write_exp:
with open(test_file_expected, "wb") as f: with open(test_file_expected, "wb") as f: