@@ -424,6 +424,7 @@ def main():
424
424
parser .add_argument ('--tmpdirprefix' , '-t' , default = tempfile .gettempdir (), help = "Root directory for datadirs" )
425
425
parser .add_argument ('--failfast' , '-F' , action = 'store_true' , help = 'stop execution after the first test failure' )
426
426
parser .add_argument ('--filter' , help = 'filter scripts to run by regular expression' )
427
+ parser .add_argument ("--legacy-wallet" , action = 'store_const' , const = False , help = "Run test using legacy wallets" , dest = 'legacy_wallet' )
427
428
428
429
429
430
args , unknown_args = parser .parse_known_args ()
@@ -535,9 +536,10 @@ def main():
535
536
combined_logs_len = args .combinedlogslen ,
536
537
failfast = args .failfast ,
537
538
use_term_control = args .ansi ,
539
+ legacy = args .legacy_wallet ,
538
540
)
539
541
540
- def run_tests (* , test_list , src_dir , build_dir , tmpdir , jobs = 1 , enable_coverage = False , args = None , combined_logs_len = 0 , failfast = False , use_term_control ):
542
+ def run_tests (* , test_list , src_dir , build_dir , tmpdir , jobs = 1 , enable_coverage = False , args = None , combined_logs_len = 0 , failfast = False , use_term_control , legacy = False ):
541
543
args = args or []
542
544
543
545
# Warn if bitcoind is already running
@@ -572,7 +574,10 @@ def run_tests(*, test_list, src_dir, build_dir, tmpdir, jobs=1, enable_coverage=
572
574
if len (test_list ) > 1 and jobs > 1 :
573
575
# Populate cache
574
576
try :
575
- subprocess .check_output ([sys .executable , tests_dir + 'create_cache.py' ] + flags + ["--tmpdir=%s/cache" % tmpdir ])
577
+ # Disable '--descriptors' flag on create_cache if '--legacy-wallet' flag is provided
578
+ wallet_flag = '--legacy-wallet' if legacy else '--descriptors'
579
+
580
+ subprocess .check_output ([sys .executable , tests_dir + 'create_cache.py' ] + flags + [f"--tmpdir={ tmpdir } /cache" , wallet_flag ])
576
581
except subprocess .CalledProcessError as e :
577
582
sys .stdout .buffer .write (e .output )
578
583
raise
0 commit comments