diff options
author | MarcoFalke <falke.marco@gmail.com> | 2018-09-27 12:16:13 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2018-09-27 12:16:15 -0400 |
commit | 9b8bb5f1402a07736be7d649c2253253672d04e1 (patch) | |
tree | 40efd50522d3b4df12d7e57b9388506e4179bd34 | |
parent | 134b42a409eca0171adbb1e5b49b32f1c13c3733 (diff) | |
parent | c7b3e487f229142795a0b3ce6ce409ce7084d966 (diff) |
Merge #14316: tests: exclude all tests with difference parameters in `--exclude` list
c7b3e487f2 tests: exclude all tests with difference parameters (Chun Kuan Lee)
Pull request description:
Fix broken exclusion list in functional tests. See https://github.com/bitcoin/bitcoin/pull/14007#pullrequestreview-158309105
Tree-SHA512: b6c2b86fef13e3c00c695adaeeb3e47ee9b48877c71bc605d24201ce931b2ef3ae9f5f199071fa1ec5de2d7aadc478410094c380cc297922e683e9b2569cda03
-rw-r--r-- | .appveyor.yml | 2 | ||||
-rwxr-xr-x | test/functional/test_runner.py | 10 |
2 files changed, 7 insertions, 5 deletions
diff --git a/.appveyor.yml b/.appveyor.yml index 84cd596bbd..d7ce2224e9 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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 diff --git a/test/functional/test_runner.py b/test/functional/test_runner.py index 28437f8925..d9960460d9 100755 --- a/test/functional/test_runner.py +++ b/test/functional/test_runner.py @@ -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(',')] 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] + 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: |