Because stdout and stderr are consumed by the node, the mock external signers can’t use them for logging.
Instead have them print directly into test_framework.log, which can then be be retrieved via combine_logs.py.
In preparation (and addtion) this PR starts with a few refactors:
- move
mock_signer_pathhelpers toutiland reuse them betweenrpc_signer.pyandwallet_signer.py - move the mocks from
test/functional/mockstotest/functional: this is needed to avoid Python import hell in the next commits - have the mocks take advantage of the
test_frameworkby extracting (and reusing)perform_pre_checksandmock_signer_psbt_pathintoutil - extract the
debug.logstyleFormatterintoutilso we can use it in the final commit
Originally this PR was intended to aid in debugging #32855, which has been solved since.