This PR fixes the rpc_signer.py
and wallet_signer.py
functional tests on systems where python3
is not available in the PATH
, causing the shebang #!/usr/bin/env python3
to fail.
Here are logs on NetBSD 10.0:
- without this PR (only #31537 branch):
0$ python3.12 ./build/test/functional/test_runner.py rpc_signer.py wallet_signer.py
1Temporary test directory at /tmp/test_runner_₿_🏃_20241219_160538
2Remaining jobs: [rpc_signer.py, wallet_signer.py --descriptors]
31/2 - rpc_signer.py failed, Duration: 1 s
4
5stdout:
62024-12-19T16:05:40.012000Z TestFramework (INFO): PRNG seed is: 1833166631173850775
72024-12-19T16:05:40.012000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20241219_160538/rpc_signer_1
82024-12-19T16:05:40.754000Z TestFramework (ERROR): Assertion failed
9Traceback (most recent call last):
10 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/util.py", line 160, in try_rpc
11 fun(*args, **kwds)
12 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
13 return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
14 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/authproxy.py", line 146, in __call__
16 raise JSONRPCException(response['error'], status)
17test_framework.authproxy.JSONRPCException: RunCommandParseJSON error: process(/home/hebasto/dev/bitcoin/test/functional/mocks/signer.py enumerate) returned 127: env: python3: No such file or directory
18 (-1)
19
20During handling of the above exception, another exception occurred:
21
22Traceback (most recent call last):
23 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/test_framework.py", line 135, in main
24 self.run_test()
25 File "/home/hebasto/dev/bitcoin/build/test/functional/rpc_signer.py", line 72, in run_test
26 assert_raises_rpc_error(-1, 'fingerprint not found',
27 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/util.py", line 151, in assert_raises_rpc_error
28 assert try_rpc(code, message, fun, *args, **kwds), "No exception raised"
29 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/util.py", line 166, in try_rpc
31 raise AssertionError(
32AssertionError: Expected substring not found in error message:
33substring: 'fingerprint not found'
34error message: 'RunCommandParseJSON error: process(/home/hebasto/dev/bitcoin/test/functional/mocks/signer.py enumerate) returned 127: env: python3: No such file or directory
35'.
362024-12-19T16:05:40.756000Z TestFramework (INFO): Stopping nodes
372024-12-19T16:05:40.873000Z TestFramework (WARNING): Not cleaning up dir /tmp/test_runner_₿_🏃_20241219_160538/rpc_signer_1
382024-12-19T16:05:40.873000Z TestFramework (ERROR): Test failed. Test logging available at /tmp/test_runner_₿_🏃_20241219_160538/rpc_signer_1/test_framework.log
392024-12-19T16:05:40.873000Z TestFramework (ERROR):
402024-12-19T16:05:40.873000Z TestFramework (ERROR): Hint: Call /home/hebasto/dev/bitcoin/test/functional/combine_logs.py '/tmp/test_runner_₿_🏃_20241219_160538/rpc_signer_1' to consolidate all logs
412024-12-19T16:05:40.873000Z TestFramework (ERROR):
422024-12-19T16:05:40.873000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
432024-12-19T16:05:40.873000Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
442024-12-19T16:05:40.873000Z TestFramework (ERROR):
45
46
47stderr:
48
49
50Remaining jobs: [wallet_signer.py --descriptors]
512/2 - wallet_signer.py --descriptors failed, Duration: 1 s
52
53stdout:
542024-12-19T16:05:40.014000Z TestFramework (INFO): PRNG seed is: 7530764367977090686
552024-12-19T16:05:40.014000Z TestFramework (INFO): Initializing test directory /tmp/test_runner_₿_🏃_20241219_160538/wallet_signer_0
562024-12-19T16:05:40.526000Z TestFramework (ERROR): JSONRPC error
57Traceback (most recent call last):
58 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/test_framework.py", line 135, in main
59 self.run_test()
60 File "/home/hebasto/dev/bitcoin/build/test/functional/wallet_signer.py", line 66, in run_test
61 self.test_valid_signer()
62 File "/home/hebasto/dev/bitcoin/build/test/functional/wallet_signer.py", line 83, in test_valid_signer
63 self.nodes[1].createwallet(wallet_name='hww', disable_private_keys=True, descriptors=True, external_signer=True)
64 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/test_node.py", line 935, in createwallet
65 return self.__getattr__('createwallet')(wallet_name, disable_private_keys, blank, passphrase, avoid_reuse, descriptors, load_on_startup, external_signer)
66 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/coverage.py", line 50, in __call__
68 return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
69 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
70 File "/home/hebasto/dev/bitcoin/test/functional/test_framework/authproxy.py", line 146, in __call__
71 raise JSONRPCException(response['error'], status)
72test_framework.authproxy.JSONRPCException: RunCommandParseJSON error: process(/home/hebasto/dev/bitcoin/test/functional/mocks/signer.py enumerate) returned 127: env: python3: No such file or directory
73 (-1)
742024-12-19T16:05:40.528000Z TestFramework (INFO): Stopping nodes
752024-12-19T16:05:40.645000Z TestFramework (WARNING): Not cleaning up dir /tmp/test_runner_₿_🏃_20241219_160538/wallet_signer_0
762024-12-19T16:05:40.646000Z TestFramework (ERROR): Test failed. Test logging available at /tmp/test_runner_₿_🏃_20241219_160538/wallet_signer_0/test_framework.log
772024-12-19T16:05:40.646000Z TestFramework (ERROR):
782024-12-19T16:05:40.646000Z TestFramework (ERROR): Hint: Call /home/hebasto/dev/bitcoin/test/functional/combine_logs.py '/tmp/test_runner_₿_🏃_20241219_160538/wallet_signer_0' to consolidate all logs
792024-12-19T16:05:40.646000Z TestFramework (ERROR):
802024-12-19T16:05:40.646000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
812024-12-19T16:05:40.646000Z TestFramework (ERROR): https://github.com/bitcoin/bitcoin/issues
822024-12-19T16:05:40.646000Z TestFramework (ERROR):
83
84
85stderr:
86
87
88
89TEST | STATUS | DURATION
90
91rpc_signer.py | ✖ Failed | 1 s
92wallet_signer.py --descriptors | ✖ Failed | 1 s
93
94ALL | ✖ Failed | 2 s (accumulated)
95Runtime: 1 s
- with this PR:
0$ python3.12 ./build/test/functional/test_runner.py rpc_signer.py wallet_signer.py
1Temporary test directory at /tmp/test_runner_₿_🏃_20241219_160011
2Remaining jobs: [rpc_signer.py, wallet_signer.py --descriptors]
31/2 - rpc_signer.py passed, Duration: 2 s
4Remaining jobs: [wallet_signer.py --descriptors]
52/2 - wallet_signer.py --descriptors passed, Duration: 3 s
6
7TEST | STATUS | DURATION
8
9rpc_signer.py | ✓ Passed | 2 s
10wallet_signer.py --descriptors | ✓ Passed | 3 s
11
12ALL | ✓ Passed | 5 s (accumulated)
13Runtime: 3 s