Skip to content

Commit

Permalink
Merge bitcoin#23097: Run specified functional tests with all matching…
Browse files Browse the repository at this point in the history
… flags

b8909b0 Run functional tests with all possible flags (Samuel Dobson)

Pull request description:

  Functional tests which use flags like `--descriptors` or `--legacy-wallet` won't run if only the base script is given to `test_runner.py` because it doesn't match any script in the list exactly. It would be easier if it would just run both options.

  For example, instead of:
  ```
  test_runner.py 'wallet_basic.py --legacy-wallet' 'wallet_basic.py --descriptors'
  ```

  We can now just run:
  ```
  test_runner.py wallet_basic
  ```

  Also useful for `--usecli`, the IPv4/IPv6/nonloopback `rpc_bind.py` variations, etc.

ACKs for top commit:
  laanwj:
    Code review ACK b8909b0
  MarcoFalke:
    review ACK b8909b0

Tree-SHA512: d367037cb170e705551726d47fe4569ebc3ceadece280dd3edbb3ecb41e19f3263d6d272b407316ed6011164e850df4321fb340b1b183b34497c9f7cc439f4d8
  • Loading branch information
laanwj authored and PastaPastaPasta committed Mar 13, 2022
1 parent d03696c commit f963695
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/functional/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ def main():
for test in tests:
script = test.split("/")[-1]
script = script + ".py" if ".py" not in script else script
if script in ALL_SCRIPTS:
test_list.append(script)
matching_scripts = [s for s in ALL_SCRIPTS if s.startswith(script)]
if matching_scripts:
test_list.extend(matching_scripts)
else:
print("{}WARNING!{} Test '{}' not found in full test list.".format(BOLD[1], BOLD[0], test))
elif args.extended:
Expand Down

0 comments on commit f963695

Please sign in to comment.