Skip to content

Commit 62b7f30

Browse files
committed
tests: Automatically run both wallet types in parallel for wallet tests
Most wallet tests need to be run with both wallet types. Instead of requiring developers to manually specify this, the test_runner can find the wallet tests that do not have a wallet type specified and automatically run the test with both types.
1 parent 6891bd3 commit 62b7f30

File tree

1 file changed

+51
-77
lines changed

1 file changed

+51
-77
lines changed

test/functional/test_runner.py

+51-77
Original file line numberDiff line numberDiff line change
@@ -108,31 +108,27 @@
108108
# vv Tests less than 60s vv
109109
'rpc_psbt.py --legacy-wallet',
110110
'rpc_psbt.py --descriptors',
111-
'wallet_fundrawtransaction.py --legacy-wallet',
112-
'wallet_fundrawtransaction.py --descriptors',
113-
'wallet_bumpfee.py --legacy-wallet',
114-
'wallet_bumpfee.py --descriptors',
111+
'wallet_fundrawtransaction.py',
112+
'wallet_bumpfee.py',
115113
'wallet_import_rescan.py --legacy-wallet',
116-
'wallet_backup.py --legacy-wallet',
117-
'wallet_backup.py --descriptors',
114+
'wallet_backup.py',
118115
'feature_segwit.py --legacy-wallet',
119116
'feature_segwit.py --descriptors',
120117
'p2p_tx_download.py',
121-
'wallet_avoidreuse.py --legacy-wallet',
122-
'wallet_avoidreuse.py --descriptors',
118+
'wallet_avoidreuse.py',
123119
'feature_abortnode.py',
124120
'wallet_address_types.py --legacy-wallet',
125121
'wallet_address_types.py --descriptors',
126-
'p2p_orphan_handling.py',
127122
'wallet_basic.py --legacy-wallet',
128123
'wallet_basic.py --descriptors',
124+
'wallet_address_types.py',
125+
'p2p_orphan_handling.py',
126+
'wallet_basic.py',
129127
'feature_maxtipage.py',
130-
'wallet_multiwallet.py --legacy-wallet',
131-
'wallet_multiwallet.py --descriptors',
128+
'wallet_multiwallet.py',
132129
'wallet_multiwallet.py --usecli',
133130
'p2p_dns_seeds.py',
134-
'wallet_groups.py --legacy-wallet',
135-
'wallet_groups.py --descriptors',
131+
'wallet_groups.py',
136132
'p2p_blockfilters.py',
137133
'feature_assumevalid.py',
138134
'wallet_taproot.py --descriptors',
@@ -145,8 +141,7 @@
145141
'p2p_feefilter.py',
146142
'feature_csv_activation.py',
147143
'p2p_sendheaders.py',
148-
'wallet_listtransactions.py --legacy-wallet',
149-
'wallet_listtransactions.py --descriptors',
144+
'wallet_listtransactions.py',
150145
# vv Tests less than 30s vv
151146
'p2p_invalid_messages.py',
152147
'rpc_createmultisig.py',
@@ -157,21 +152,15 @@
157152
'wallet_importmulti.py --legacy-wallet',
158153
'mempool_limit.py',
159154
'rpc_txoutproof.py',
160-
'wallet_listreceivedby.py --legacy-wallet',
161-
'wallet_listreceivedby.py --descriptors',
162-
'wallet_abandonconflict.py --legacy-wallet',
163-
'wallet_abandonconflict.py --descriptors',
155+
'wallet_listreceivedby.py',
156+
'wallet_abandonconflict.py',
164157
'feature_reindex.py',
165-
'wallet_labels.py --legacy-wallet',
166-
'wallet_labels.py --descriptors',
158+
'wallet_labels.py',
167159
'p2p_compactblocks.py',
168160
'p2p_compactblocks_blocksonly.py',
169-
'wallet_hd.py --legacy-wallet',
170-
'wallet_hd.py --descriptors',
171-
'wallet_blank.py --legacy-wallet',
172-
'wallet_blank.py --descriptors',
173-
'wallet_keypool_topup.py --legacy-wallet',
174-
'wallet_keypool_topup.py --descriptors',
161+
'wallet_hd.py',
162+
'wallet_blank.py',
163+
'wallet_keypool_topup.py',
175164
'wallet_fast_rescan.py --descriptors',
176165
'interface_zmq.py',
177166
'rpc_invalid_address_message.py',
@@ -185,26 +174,21 @@
185174
'tool_wallet.py --descriptors',
186175
'tool_signet_miner.py --legacy-wallet',
187176
'tool_signet_miner.py --descriptors',
188-
'wallet_txn_clone.py --legacy-wallet',
189-
'wallet_txn_clone.py --descriptors',
190-
'wallet_txn_clone.py --segwit --legacy-wallet',
191-
'wallet_txn_clone.py --segwit --descriptors',
177+
'wallet_txn_clone.py',
178+
'wallet_txn_clone.py --segwit',
192179
'rpc_getchaintips.py',
193180
'rpc_misc.py',
194181
'interface_rest.py',
195182
'mempool_spend_coinbase.py',
196183
'wallet_avoid_mixing_output_types.py --descriptors',
197184
'mempool_reorg.py',
198185
'p2p_block_sync.py',
199-
'wallet_createwallet.py --legacy-wallet',
186+
'wallet_createwallet.py',
200187
'wallet_createwallet.py --usecli',
201-
'wallet_createwallet.py --descriptors',
202188
'wallet_watchonly.py --legacy-wallet',
203189
'wallet_watchonly.py --usecli --legacy-wallet',
204-
'wallet_reorgsrestore.py --legacy-wallet',
205-
'wallet_reorgsrestore.py --descriptors',
206-
'wallet_conflicts.py --legacy-wallet',
207-
'wallet_conflicts.py --descriptors',
190+
'wallet_reorgsrestore.py',
191+
'wallet_conflicts.py',
208192
'interface_http.py',
209193
'interface_rpc.py',
210194
'interface_usdt_coinselection.py',
@@ -215,12 +199,10 @@
215199
'rpc_users.py',
216200
'rpc_whitelist.py',
217201
'feature_proxy.py',
218-
'wallet_signrawtransactionwithwallet.py --legacy-wallet',
219-
'wallet_signrawtransactionwithwallet.py --descriptors',
202+
'wallet_signrawtransactionwithwallet.py',
220203
'rpc_signrawtransactionwithkey.py',
221204
'rpc_rawtransaction.py --legacy-wallet',
222-
'wallet_transactiontime_rescan.py --descriptors',
223-
'wallet_transactiontime_rescan.py --legacy-wallet',
205+
'wallet_transactiontime_rescan.py',
224206
'p2p_addrv2_relay.py',
225207
'p2p_compactblocks_hb.py',
226208
'p2p_disconnect_ban.py',
@@ -236,8 +218,7 @@
236218
'p2p_getdata.py',
237219
'p2p_addrfetch.py',
238220
'rpc_net.py',
239-
'wallet_keypool.py --legacy-wallet',
240-
'wallet_keypool.py --descriptors',
221+
'wallet_keypool.py',
241222
'wallet_descriptor.py --descriptors',
242223
'wallet_miniscript.py --descriptors',
243224
'p2p_nobloomfilter_messages.py',
@@ -249,13 +230,10 @@
249230
'p2p_invalid_block.py',
250231
'p2p_invalid_tx.py',
251232
'example_test.py',
252-
'wallet_txn_doublespend.py --legacy-wallet',
233+
'wallet_txn_doublespend.py',
253234
'wallet_multisig_descriptor_psbt.py --descriptors',
254-
'wallet_txn_doublespend.py --descriptors',
255-
'wallet_backwards_compatibility.py --legacy-wallet',
256-
'wallet_backwards_compatibility.py --descriptors',
257-
'wallet_txn_clone.py --mineblock --legacy-wallet',
258-
'wallet_txn_clone.py --mineblock --descriptors',
235+
'wallet_backwards_compatibility.py',
236+
'wallet_txn_clone.py --mineblock',
259237
'feature_notifications.py',
260238
'rpc_getblockfilter.py',
261239
'rpc_getblockfrompeer.py',
@@ -267,17 +245,14 @@
267245
'mempool_package_limits.py',
268246
'feature_versionbits_warning.py',
269247
'rpc_preciousblock.py',
270-
'wallet_importprunedfunds.py --legacy-wallet',
271-
'wallet_importprunedfunds.py --descriptors',
248+
'wallet_importprunedfunds.py',
272249
'p2p_leak_tx.py',
273250
'p2p_eviction.py',
274251
'p2p_ibd_stalling.py',
275-
'wallet_signmessagewithaddress.py --legacy-wallet',
276-
'wallet_signmessagewithaddress.py --descriptors',
252+
'wallet_signmessagewithaddress.py',
277253
'rpc_signmessagewithprivkey.py',
278254
'rpc_generate.py',
279-
'wallet_balance.py --legacy-wallet',
280-
'wallet_balance.py --descriptors',
255+
'wallet_balance.py',
281256
'p2p_initial_headers_sync.py',
282257
'feature_nulldummy.py',
283258
'mempool_accept.py',
@@ -291,39 +266,30 @@
291266
'wallet_implicitsegwit.py --legacy-wallet',
292267
'rpc_named_arguments.py',
293268
'feature_startupnotify.py',
294-
'wallet_simulaterawtx.py --legacy-wallet',
295-
'wallet_simulaterawtx.py --descriptors',
296-
'wallet_listsinceblock.py --legacy-wallet',
297-
'wallet_listsinceblock.py --descriptors',
269+
'wallet_simulaterawtx.py',
270+
'wallet_listsinceblock.py',
298271
'wallet_listdescriptors.py --descriptors',
299272
'p2p_leak.py',
300-
'wallet_encryption.py --legacy-wallet',
301-
'wallet_encryption.py --descriptors',
273+
'wallet_encryption.py',
302274
'feature_dersig.py',
303275
'feature_cltv.py',
304276
'rpc_uptime.py',
305277
'feature_discover.py',
306-
'wallet_resendwallettransactions.py --legacy-wallet',
307-
'wallet_resendwallettransactions.py --descriptors',
308-
'wallet_fallbackfee.py --legacy-wallet',
309-
'wallet_fallbackfee.py --descriptors',
278+
'wallet_resendwallettransactions.py',
279+
'wallet_fallbackfee.py',
310280
'rpc_dumptxoutset.py',
311281
'feature_minchainwork.py',
312282
'rpc_estimatefee.py',
313283
'rpc_getblockstats.py',
314284
'feature_bind_port_externalip.py',
315-
'wallet_create_tx.py --legacy-wallet',
316-
'wallet_send.py --legacy-wallet',
317-
'wallet_send.py --descriptors',
318-
'wallet_sendall.py --legacy-wallet',
319-
'wallet_sendall.py --descriptors',
320-
'wallet_create_tx.py --descriptors',
285+
'wallet_create_tx.py',
286+
'wallet_send.py',
287+
'wallet_sendall.py',
321288
'wallet_inactive_hdchains.py --legacy-wallet',
322289
'p2p_fingerprint.py',
323290
'feature_uacomment.py',
324291
'feature_init.py',
325-
'wallet_coinbase_category.py --legacy-wallet',
326-
'wallet_coinbase_category.py --descriptors',
292+
'wallet_coinbase_category.py',
327293
'feature_filelock.py',
328294
'feature_loadblock.py',
329295
'p2p_dos_header_tree.py',
@@ -353,14 +319,12 @@
353319
'feature_anchors.py',
354320
'mempool_datacarrier.py',
355321
'feature_coinstatsindex.py',
356-
'wallet_orphanedreward.py --descriptors',
357-
'wallet_orphanedreward.py --legacy-wallet',
322+
'wallet_orphanedreward.py',
358323
'wallet_timelock.py',
359324
'p2p_node_network_limited.py',
360325
'p2p_permissions.py',
361326
'feature_blocksdir.py',
362-
'wallet_startup.py --legacy-wallet',
363-
'wallet_startup.py --descriptors',
327+
'wallet_startup.py',
364328
'feature_remove_pruned_files_on_startup.py',
365329
'p2p_i2p_ports.py',
366330
'p2p_i2p_sessions.py',
@@ -483,6 +447,16 @@ def main():
483447
# Run base tests only
484448
test_list += BASE_SCRIPTS
485449

450+
# Run both --legacy-wallet and --descriptors for wallet tests unless one of those options was already provided
451+
mod_test_list = []
452+
for test in test_list:
453+
if not test.startswith("wallet_") or "--legacy-wallet" in test or "--descriptors" in test or test == "wallet_disable.py":
454+
mod_test_list.append(test)
455+
continue
456+
mod_test_list.append(test + " --legacy-wallet")
457+
mod_test_list.append(test + " --descriptors")
458+
test_list = mod_test_list
459+
486460
# Remove the test cases that the user has explicitly asked to exclude.
487461
if args.exclude:
488462
exclude_tests = [test.split('.py')[0] for test in args.exclude.split(',')]

0 commit comments

Comments
 (0)