mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-07-09 09:51:08 +02:00
tests: Improve test runner output in case of target errors
This commit is contained in:
@ -168,7 +168,15 @@ def run_once(*, corpus, test_list, build_dir, export_coverage, use_valgrind):
|
|||||||
result = subprocess.run(args, stderr=subprocess.PIPE, universal_newlines=True)
|
result = subprocess.run(args, stderr=subprocess.PIPE, universal_newlines=True)
|
||||||
output = result.stderr
|
output = result.stderr
|
||||||
logging.debug('Output: {}'.format(output))
|
logging.debug('Output: {}'.format(output))
|
||||||
result.check_returncode()
|
try:
|
||||||
|
result.check_returncode()
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
if e.stdout:
|
||||||
|
logging.info(e.stdout)
|
||||||
|
if e.stderr:
|
||||||
|
logging.info(e.stderr)
|
||||||
|
logging.info("Target \"{}\" failed with exit code {}: {}".format(t, e.returncode, " ".join(args)))
|
||||||
|
sys.exit(1)
|
||||||
if not export_coverage:
|
if not export_coverage:
|
||||||
continue
|
continue
|
||||||
for l in output.splitlines():
|
for l in output.splitlines():
|
||||||
|
Reference in New Issue
Block a user