Skip to content

Commit b987ca4

Browse files
author
MarcoFalke
committed
Merge #12227: test_runner: Readable output if create_cache.py fails
ac96e78 test_runner: Readable output if create_cache.py fails (Russell Yanofsky) Pull request description: 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. Tree-SHA512: 49cd0fff037c03f558e31a1281712cc4419df6c4ed8b342057a3d54ab6b31180e1a23cb586686952d81b8add5bec07844efa8cdf16ad20f40cc903a19437fda5
2 parents b030133 + ac96e78 commit b987ca4

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)