testr has no way to exclude tests other than with regexp
Bug #1208610 reported by
David Kranz
This bug affects 6 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Testrepository |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
The use case prompting this is where there a bunch of tests that you want to include based on a match in the test name, but some of them should be excluded based of matching other parts of the name. This was especially desired because testr makes tags on test cases part of the name. As is, constructing regexps out of a combination of includes and excludes is hard for those who are not true regexp wizards.
Here is a proposal:
Provide a --exclude REGEXP argument that can appear any number of times. After the list of included tests is constructed, each test whose name matches one of the excludes is removed.
To post a comment you must log in.
So this basically builds a language for including and excluding test, which is exactly what a regex is. What happens if someone includes two different patterns and excludes two different patterns? Is it evaluated left to right or union-adds then subtract all excludes? What if someone can't exclude precisely and wants to exclude then include?
I'm open to the idea of having a meta language rather than just regexp, but it needs to be designed, with care, or it just becomes a wart.