Skip to content

Commit 547aacf

Browse files
committed
test: add -v1transport option and use it in test_runner
This option beats the --v2transport option and is meant to be used in test_runner.py. It applies these to a few tests that are particulary interesting in terms of the transport type. This ensures that these tests arei always run with both v1 and v2, irrespective of whether the global --v2transport test_runner option is set or not.
1 parent 6a7ed5e commit 547aacf

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

test/functional/test_framework/test_framework.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ def parse_args(self):
191191
parser.add_argument("--timeout-factor", dest="timeout_factor", type=float, help="adjust test timeouts by a factor. Setting it to 0 disables all timeouts")
192192
parser.add_argument("--v2transport", dest="v2transport", default=False, action="store_true",
193193
help="use BIP324 v2 connections between all nodes by default")
194+
parser.add_argument("--v1transport", dest="v1transport", default=False, action="store_true",
195+
help="Explicitly use v1 transport (can be used to overwrite global --v2transport option)")
194196

195197
self.add_options(parser)
196198
# Running TestShell in a Jupyter notebook causes an additional -f argument
@@ -206,6 +208,8 @@ def parse_args(self):
206208
config = configparser.ConfigParser()
207209
config.read_file(open(self.options.configfile))
208210
self.config = config
211+
if self.options.v1transport:
212+
self.options.v2transport=False
209213

210214
if "descriptors" not in self.options:
211215
# Wallet is not required by the test at all and the value of self.options.descriptors won't matter.

test/functional/test_runner.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@
120120
'wallet_backup.py --legacy-wallet',
121121
'wallet_backup.py --descriptors',
122122
'feature_segwit.py --legacy-wallet',
123-
'feature_segwit.py --descriptors',
123+
'feature_segwit.py --descriptors --v1transport',
124124
'feature_segwit.py --descriptors --v2transport',
125125
'p2p_tx_download.py',
126126
'wallet_avoidreuse.py --legacy-wallet',
@@ -156,7 +156,7 @@
156156
# vv Tests less than 30s vv
157157
'p2p_invalid_messages.py',
158158
'rpc_createmultisig.py',
159-
'p2p_timeouts.py',
159+
'p2p_timeouts.py --v1transport',
160160
'p2p_timeouts.py --v2transport',
161161
'wallet_dump.py --legacy-wallet',
162162
'rpc_signer.py',
@@ -201,7 +201,7 @@
201201
'mempool_spend_coinbase.py',
202202
'wallet_avoid_mixing_output_types.py --descriptors',
203203
'mempool_reorg.py',
204-
'p2p_block_sync.py',
204+
'p2p_block_sync.py --v1transport',
205205
'p2p_block_sync.py --v2transport',
206206
'wallet_createwallet.py --legacy-wallet',
207207
'wallet_createwallet.py --usecli',
@@ -230,13 +230,13 @@
230230
'wallet_transactiontime_rescan.py --descriptors',
231231
'wallet_transactiontime_rescan.py --legacy-wallet',
232232
'p2p_addrv2_relay.py',
233-
'p2p_compactblocks_hb.py',
233+
'p2p_compactblocks_hb.py --v1transport',
234234
'p2p_compactblocks_hb.py --v2transport',
235-
'p2p_disconnect_ban.py',
235+
'p2p_disconnect_ban.py --v1transport',
236236
'p2p_disconnect_ban.py --v2transport',
237237
'feature_posix_fs_permissions.py',
238238
'rpc_decodescript.py',
239-
'rpc_blockchain.py',
239+
'rpc_blockchain.py --v1transport',
240240
'rpc_blockchain.py --v2transport',
241241
'rpc_deprecated.py',
242242
'wallet_disable.py',
@@ -246,21 +246,21 @@
246246
'p2p_getaddr_caching.py',
247247
'p2p_getdata.py',
248248
'p2p_addrfetch.py',
249-
'rpc_net.py',
249+
'rpc_net.py --v1transport',
250250
'rpc_net.py --v2transport',
251251
'wallet_keypool.py --legacy-wallet',
252252
'wallet_keypool.py --descriptors',
253253
'wallet_descriptor.py --descriptors',
254254
'p2p_nobloomfilter_messages.py',
255255
'p2p_filter.py',
256-
'rpc_setban.py',
256+
'rpc_setban.py --v1transport',
257257
'rpc_setban.py --v2transport',
258258
'p2p_blocksonly.py',
259259
'mining_prioritisetransaction.py',
260260
'p2p_invalid_locator.py',
261-
'p2p_invalid_block.py',
261+
'p2p_invalid_block.py --v1transport',
262262
'p2p_invalid_block.py --v2transport',
263-
'p2p_invalid_tx.py',
263+
'p2p_invalid_tx.py --v1transport',
264264
'p2p_invalid_tx.py --v2transport',
265265
'p2p_v2_transport.py',
266266
'p2p_v2_encrypted.py',
@@ -286,12 +286,12 @@
286286
'rpc_preciousblock.py',
287287
'wallet_importprunedfunds.py --legacy-wallet',
288288
'wallet_importprunedfunds.py --descriptors',
289-
'p2p_leak_tx.py',
289+
'p2p_leak_tx.py --v1transport',
290290
'p2p_leak_tx.py --v2transport',
291291
'p2p_eviction.py',
292-
'p2p_ibd_stalling.py',
292+
'p2p_ibd_stalling.py --v1transport',
293293
'p2p_ibd_stalling.py --v2transport',
294-
'p2p_net_deadlock.py',
294+
'p2p_net_deadlock.py --v1transport',
295295
'p2p_net_deadlock.py --v2transport',
296296
'wallet_signmessagewithaddress.py',
297297
'rpc_signmessagewithprivkey.py',
@@ -380,7 +380,7 @@
380380
'feature_coinstatsindex.py',
381381
'wallet_orphanedreward.py',
382382
'wallet_timelock.py',
383-
'p2p_node_network_limited.py',
383+
'p2p_node_network_limited.py --v1transport',
384384
'p2p_node_network_limited.py --v2transport',
385385
'p2p_permissions.py',
386386
'feature_blocksdir.py',

0 commit comments

Comments
 (0)