aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-09-28 15:26:37 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-09-28 15:32:23 +0200
commitefa227f5df5f5a9669dec5f1d574cf22d3c0903f (patch)
tree9294d081c865aeebafc70732c4496e125c330bb0
parentdccf3d25f9e78909eb7b3143e89a7c87fac25ab5 (diff)
parentb8909b074603a05a1a255461ca78d8a013dd3044 (diff)
Merge bitcoin/bitcoin#23097: Run specified functional tests with all matching flags
b8909b074603a05a1a255461ca78d8a013dd3044 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 b8909b074603a05a1a255461ca78d8a013dd3044 MarcoFalke: review ACK b8909b074603a05a1a255461ca78d8a013dd3044 Tree-SHA512: d367037cb170e705551726d47fe4569ebc3ceadece280dd3edbb3ecb41e19f3263d6d272b407316ed6011164e850df4321fb340b1b183b34497c9f7cc439f4d8
-rwxr-xr-xtest/functional/test_runner.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py
index 3792d751de..b463f05869 100755
--- a/test/functional/test_runner.py
+++ b/test/functional/test_runner.py
@@ -401,8 +401,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: