This restores previous behaviour of being able to exclude a test by name without having to specify .py extension.
It was noticed in #30851 that tests were no longer being excluded.
PR #30244 introduced being able to exclude a specific tests based on args (such as --exclude "rpc_bind.py --ipv6
) but it made the wrong assumption that test names intended to be excluded would include the .py extension.
The following #30244 (comment) shows that this is not how the --exclude
flag was used in CI.
#30244 (comment) gave three examples of --exclude
being used in CI so I compared the number of tests that the runner would run for these three examples in three situations, before #30244 was introduced, in master today and with this PR applied.
Example:
--previous-releases --coverage --extended --exclude feature_dbcrash
Test count: Before #30244 introduced: 314 Master: 315 With this PR: 314
Example:
--exclude feature_init,rpc_bind,feature_bind_extra
Test count: Before #30244 introduced: 306 Master 311 With this PR: 306
Example:
--exclude rpc_bind,feature_bind_extra
Before #30244 introduced: 307 Master 311 With this PR: 307
I’ve also tested that the functionality introduced with #30244 remains and we can still exclude specific tests by argument.