[Feature Request] `test-include-paths` is nearly useless
Nobody has claimed this yet.
- Dominant language
- Racket
- Stars
- 5.2k
- Forks
- 698
- Avg merge
- 18h 34m
- Merged PRs (30d)
- 5
Description
Is your feature request related to a problem? Please describe.
Side issue
First, the description of test-include-paths and test-omit-paths is weird in that it doesn't talk about the relationship between them. I expected something along the lines of using include (which defaults to 'all) and then ignoring things in omit. After visiting the source, I *think* that include` is useful only for including things with an irregular suffix which is otherwise not included.
If this is indeed the case, it should be documented in a way that makes it clear that it's not "what you think it is" (where "you" is anyone that dealt with such include/exclude lists in almost every other context that I've seen). If it's not the case, then it should definitely be explained better since it means that it's difficult enough to figure out what this thing is doing that I didn't get it even after skimming the code.
The real issue
What I was trying to do is specify only one file to use for testing. I was hoping for some use of the two include/omit entries to get it to happen but that seems to not work. I don't want to list all of the existing files, since that's fragile wrt future additions. I eventually resorted to this piece of loveliness:
(define test-omit-paths '(#rx"(?<!/tests\\.rkt)$"))
It's hideous, but that's roughly what I want to say. Would be a bit better if it addressed a specific file rather than any (in gitignore terms, I want to include just /tests.rkt rather than all tests.rkt, but it works.
But it's hideous.
Describe the solution you'd like
Some way to be able to say "run only this file(s) for testing". Possibly make include default to 'all (which would implicitly use all the blessed suffixes) so I can change it to include a specific file. At least in the default installation tree this wouldn't lead to any problems since it's not used at all (unsurprisingly, given that it's "nearly useless"), but there's probably some uses of it somewhere which will break.
So maybe a new field like test-only-paths which when set, means test just these paths.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the documentation and source for test-include-paths and test-omit-paths, then trace how their path patterns are interpreted. Compare the current behavior with the requested single-file selection and clarify the relationship between the two settings. Done means the behavior is documented and a supported way to run only specified test paths is defined and verified.
Written by the indexing model from the issue text.
Assessment
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100