mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 03:18:09 -03:00
Merge bitcoin/bitcoin#31433: test: #31212 follow up (spelling, refactor)
Some checks are pending
CI / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
Some checks are pending
CI / Win64 native, VS 2022 (push) Waiting to run
CI / Win64 native fuzz, VS 2022 (push) Waiting to run
CI / ASan + LSan + UBSan + integer, no depends, USDT (push) Waiting to run
CI / test each commit (push) Waiting to run
CI / macOS 14 native, arm64, no depends, sqlite only, gui (push) Waiting to run
CI / macOS 14 native, arm64, fuzz (push) Waiting to run
41d934c72d
chore: Typo Overriden -> Overridden (Hodlinator)c9fb38a590
refactor test: Cleaner combine_logs.py logic (Hodlinator) Pull request description: - Fixes typo caught by spelling linter (https://github.com/bitcoin/bitcoin/runs/33979284676). - Minor but nice refactoring of *combine_logs.py* change that was suggested late: https://github.com/bitcoin/bitcoin/pull/31212#discussion_r1869307947 ACKs for top commit: l0rinc: ACK41d934c72d
maflcko: lgtm ACK41d934c72d
theStack: ACK41d934c72d
BrandonOdiwuor: Code Review ACK41d934c72d
tdb3: ACK41d934c72d
Tree-SHA512: cf8ecc070d0b01df9c4e57a75820e17d4535591e85bf9d271c7b8f60875f7e04b9978c56e9b88c10e89e69ff755c35b23ed291949c32c875a91c3317105a3c79
This commit is contained in:
commit
35000e34cf
2 changed files with 11 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2017-2021 The Bitcoin Core developers
|
||||
# Copyright (c) 2017-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Combine logs from multiple bitcoin nodes as well as the test_framework log.
|
||||
|
@ -81,13 +81,14 @@ def read_logs(tmp_dir):
|
|||
|
||||
# Find out what the folder is called that holds node 0's debug.log file
|
||||
debug_logs = list(pathlib.Path(tmp_dir).glob('node0/**/debug.log'))
|
||||
if len(debug_logs) > 0:
|
||||
assert len(debug_logs) < 2, 'Max one debug.log is supported, ' \
|
||||
'found several:\n\t' + '\n\t'.join([str(f) for f in debug_logs])
|
||||
path = debug_logs[0]
|
||||
chain = re.search(r'node0/(.+?)/debug\.log$', path.as_posix()).group(1) # extract the chain name
|
||||
else:
|
||||
chain = 'regtest' # fallback to regtest (should only happen when none exists)
|
||||
match len(debug_logs):
|
||||
case 0:
|
||||
chain = 'regtest' # fallback to regtest
|
||||
case 1:
|
||||
chain = re.search(r'node0/(.+?)/debug\.log$', debug_logs[0].as_posix()).group(1)
|
||||
case _:
|
||||
raise RuntimeError('Max one debug.log is supported, found several:\n\t' +
|
||||
'\n\t'.join(map(str, debug_logs)))
|
||||
|
||||
files = [("test", "%s/test_framework.log" % tmp_dir)]
|
||||
for i in itertools.count():
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env python3
|
||||
# Copyright (c) 2017-2022 The Bitcoin Core developers
|
||||
# Copyright (c) 2017-present The Bitcoin Core developers
|
||||
# Distributed under the MIT software license, see the accompanying
|
||||
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
||||
"""Test various command line arguments and configuration file parameters."""
|
||||
|
@ -31,7 +31,7 @@ class ConfArgsTest(BitcoinTestFramework):
|
|||
def setup_network(self):
|
||||
self.setup_nodes()
|
||||
|
||||
# Overriden to not start nodes automatically - doing so is the
|
||||
# Overridden to not start nodes automatically - doing so is the
|
||||
# responsibility of each test function.
|
||||
def setup_nodes(self):
|
||||
self.add_nodes(self.num_nodes, self.extra_args)
|
||||
|
|
Loading…
Reference in a new issue