Skip to content

Commit c7b3e48

Browse files
committed
tests: exclude all tests with difference parameters
1 parent 8efd874 commit c7b3e48

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ test_script:
5555
- ps: src\bench_bitcoin.exe -evals=1 -scaling=0
5656
- ps: python test\util\bitcoin-util-test.py
5757
- cmd: python test\util\rpcauth-test.py
58-
- cmd: python test\functional\test_runner.py --force --quiet --combinedlogslen=4000 --exclude "wallet_multiwallet,wallet_multiwallet.py --usecli"
58+
- cmd: python test\functional\test_runner.py --force --quiet --combinedlogslen=4000 --exclude wallet_multiwallet
5959
deploy: off

test/functional/test_runner.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,13 @@ def main():
285285

286286
# Remove the test cases that the user has explicitly asked to exclude.
287287
if args.exclude:
288-
exclude_tests = [re.sub("\.py$", "", test) + (".py" if ".py" not in test else "") for test in args.exclude.split(',')]
288+
exclude_tests = [test.split('.py')[0] for test in args.exclude.split(',')]
289289
for exclude_test in exclude_tests:
290-
if exclude_test in test_list:
291-
test_list.remove(exclude_test)
292-
else:
290+
# Remove <test_name>.py and <test_name>.py --arg from the test list
291+
exclude_list = [test for test in test_list if test.split('.py')[0] == exclude_test]
292+
for exclude_item in exclude_list:
293+
test_list.remove(exclude_item)
294+
if not exclude_list:
293295
print("{}WARNING!{} Test '{}' not found in current test list.".format(BOLD[1], BOLD[0], exclude_test))
294296

295297
if not test_list:

0 commit comments

Comments
 (0)