Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,5 @@ test_script:
- ps: src\bench_bitcoin.exe -evals=1 -scaling=0
- ps: python test\util\bitcoin-util-test.py
- cmd: python test\util\rpcauth-test.py
- cmd: python test\functional\test_runner.py --force --quiet --combinedlogslen=4000 --exclude "wallet_multiwallet,wallet_multiwallet.py --usecli"
- cmd: python test\functional\test_runner.py --force --quiet --combinedlogslen=4000 --exclude wallet_multiwallet
deploy: off
10 changes: 6 additions & 4 deletions test/functional/test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,11 +285,13 @@ def main():

# Remove the test cases that the user has explicitly asked to exclude.
if args.exclude:
exclude_tests = [re.sub("\.py$", "", test) + (".py" if ".py" not in test else "") for test in args.exclude.split(',')]
exclude_tests = [test.split('.py')[0] for test in args.exclude.split(',')]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I prefer test.strip('.py') just in case there's a very unlikely '.py' in the middle of a file name.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't work with args?

>>> 'foo.py --arg'.strip('.py')
'foo.py --arg'

for exclude_test in exclude_tests:
if exclude_test in test_list:
test_list.remove(exclude_test)
else:
# Remove <test_name>.py and <test_name>.py --arg from the test list
exclude_list = [test for test in test_list if test.split('.py')[0] == exclude_test]
Comment thread
ken2812221 marked this conversation as resolved.
Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: same as above. test.strip('.py') is preferable over test.split('.py')[0] and reads a little better.

for exclude_item in exclude_list:
test_list.remove(exclude_item)
if not exclude_list:
print("{}WARNING!{} Test '{}' not found in current test list.".format(BOLD[1], BOLD[0], exclude_test))

if not test_list:
Expand Down