aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-01-22 08:28:07 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-01-22 08:28:09 -0500
commitb987ca4ee495a7fff82f0ac14ef0753bfb7586e2 (patch)
tree35fb9c524bf967b844e83c7e649c56f94e79bfa8
parentb03013396cb2f4bf25746388b3982a2c3616e16b (diff)
parentac96e788faa33d9bf52ea0ecefa5e168f5ae326a (diff)
downloadbitcoin-b987ca4ee495a7fff82f0ac14ef0753bfb7586e2.tar.xz
Merge #12227: test_runner: Readable output if create_cache.py fails
ac96e788fa 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
-rwxr-xr-xtest/functional/test_runner.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 72ad300e7e..b8b6ee98bf 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -313,9 +313,9 @@ def run_tests(test_list, src_dir, build_dir, exeext, tmpdir, jobs=1, enable_cove
# Populate cache
try:
subprocess.check_output([tests_dir + 'create_cache.py'] + flags + ["--tmpdir=%s/cache" % tmpdir])
- except Exception as e:
- print(e.output)
- raise e
+ except subprocess.CalledProcessError as e:
+ sys.stdout.buffer.write(e.output)
+ raise
#Run Tests
job_queue = TestHandler(jobs, tests_dir, tmpdir, test_list, flags)