Skip to content

Commit ac96e78

Browse files
committed
test_runner: Readable output if create_cache.py fails
Without this change, create_cache.py process output is shown as a byte() object with \n escapes in a single line that is hard to read.
1 parent f4c942e commit ac96e78

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/functional/test_runner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -313,9 +313,9 @@ def run_tests(test_list, src_dir, build_dir, exeext, tmpdir, jobs=1, enable_cove
313313
# Populate cache
314314
try:
315315
subprocess.check_output([tests_dir + 'create_cache.py'] + flags + ["--tmpdir=%s/cache" % tmpdir])
316-
except Exception as e:
317-
print(e.output)
318-
raise e
316+
except subprocess.CalledProcessError as e:
317+
sys.stdout.buffer.write(e.output)
318+
raise
319319

320320
#Run Tests
321321
job_queue = TestHandler(jobs, tests_dir, tmpdir, test_list, flags)

0 commit comments

Comments
 (0)