Running only legacy wallet or descriptor wallet tests #20394

issue kristapsk opened this issue on November 15, 2020
  1. kristapsk commented at 5:25 AM on November 15, 2020: contributor

    test/functional/test_runner.py has command line arguments to specify legacy wallet or descriptor wallet:

      --descriptors         Run test using a descriptor wallet
      --legacy-wallet       Run test using legacy wallets
    

    But this is not working. If you will try to run test suite with --legacy-wallet argument, you will have errors on all descriptor wallet tests.

    1/194 - wallet_hd.py --descriptors failed, Duration: 0 s
    
    stdout:
    
    
    stderr:
    usage: wallet_hd.py [options]
    wallet_hd.py: error: argument --legacy-wallet: not allowed with argument --descriptors
    
    
    2/194 - wallet_backup.py --descriptors failed, Duration: 1 s
    
    stdout:
    
    
    stderr:
    usage: wallet_backup.py [options]
    wallet_backup.py: error: argument --legacy-wallet: not allowed with argument --descriptors
    
    

    By looking at --help output, I was assuming this specifies to run only either descriptor wallet or legacy wallet tests (skip others), but that's not what's happening. It just adds --descriptors or --legacy-wallet as argument to individual tests. But, as there are tests with --descriptors argument explictly specified in test list, you end up with test.py --descriptors --legacy-wallet situations.

    I think this should be either fixed or these test_runner parameters be removed.

  2. kristapsk added the label Bug on Nov 15, 2020
  3. jadijadi commented at 12:54 PM on December 27, 2020: contributor

    Thanks @kristapsk for the clear report.


    May I work on this? Since I'm thinking about some refactoring here, let me describe my solution on test/functional/test_runner.py:

    1. Moving the "DESCRIPTORS_TESTS" and "LEGACY_WALLET_TESTS" tests out of the BASE_SCRIPT and having them as separated lists without the trailing --descriptors and --legacy-wallet
    2. When creating ALL_SCRIPTS, adding the DESCRIPTORS & LEGACY_WALLET like this:
    ALL_SCRIPTS = EXTENDED_SCRIPTS + BASE_SCRIPTS + 
              [ test + ' --descriptors' for test in DESCRIPTORS_TESTS ] +
              [ test + ' --legacy-wallet' for test in LEGACY_WALLET_TESTS ]
    
    1. If the --descriptors or --legacy_wallet is provided as arg, just testing on DESCRIPTORS_TESTS or LEGACY_WALLET_TESTS lists.

    If the general idea is fine, I will test & send the PR.

  4. willcl-ark commented at 3:52 PM on February 8, 2023: contributor

    This can be closed as the options were removed in 555519d

  5. fanquake closed this on Feb 8, 2023

  6. bitcoin locked this on Feb 8, 2024
Labels

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-03 03:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me