Skip to content

Commit efa227f

Browse files
committed
Merge bitcoin/bitcoin#23097: Run specified functional tests with all matching 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
2 parents dccf3d2 + b8909b0 commit efa227f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/functional/test_runner.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,8 +401,9 @@ def main():
401401
for test in tests:
402402
script = test.split("/")[-1]
403403
script = script + ".py" if ".py" not in script else script
404-
if script in ALL_SCRIPTS:
405-
test_list.append(script)
404+
matching_scripts = [s for s in ALL_SCRIPTS if s.startswith(script)]
405+
if matching_scripts:
406+
test_list.extend(matching_scripts)
406407
else:
407408
print("{}WARNING!{} Test '{}' not found in full test list.".format(BOLD[1], BOLD[0], test))
408409
elif args.extended:

0 commit comments

Comments
 (0)