aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
authorfurszy <matiasfurszyfer@protonmail.com>2023-08-10 17:55:33 -0300
committerfurszy <matiasfurszyfer@protonmail.com>2023-10-05 09:45:09 -0300
commit0f83ab407ec5aa0591c54c03bcf408c7f2f0a192 (patch)
tree9e315c42483226ff009b47cab08af134987c080a /test/functional
parentb2ec0326fd76e64a6d0d7e4745506b29f60d0be5 (diff)
downloadbitcoin-0f83ab407ec5aa0591c54c03bcf408c7f2f0a192.tar.xz
test: display abrupt shutdown errors in console output
Making it easier to debug errors in the CI environment, particularly in scenarios where it's not immediately clear what happened nor which node crashed (or shutdown abruptly).
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/test_framework/test_node.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/functional/test_framework/test_node.py b/test/functional/test_framework/test_node.py
index 544a81602e..f599043234 100755
--- a/test/functional/test_framework/test_node.py
+++ b/test/functional/test_framework/test_node.py
@@ -232,8 +232,13 @@ class TestNode():
poll_per_s = 4
for _ in range(poll_per_s * self.rpc_timeout):
if self.process.poll() is not None:
+ # Attach abrupt shutdown error/s to the exception message
+ self.stderr.seek(0)
+ str_error = ''.join(line.decode('utf-8') for line in self.stderr)
+ str_error += "************************\n" if str_error else ''
+
raise FailedToStartError(self._node_msg(
- 'bitcoind exited with status {} during initialization'.format(self.process.returncode)))
+ f'bitcoind exited with status {self.process.returncode} during initialization. {str_error}'))
try:
rpc = get_rpc_proxy(
rpc_url(self.datadir, self.index, self.chain, self.rpchost),