Add an easy way to skip tests due to missing dependencies
- Dominant language
- Python
- Stars
- 6.6k
- Forks
- 1.9k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 33
Description
In libfprint I have tests that require pulling in additional dependencies. Right now I am adding the following code:
https://gitlab.freedesktop.org/libfprint/libfprint/commit/19f239ce617ffaf965871696167d0f767a0d6cea#af2b927c2ec3dd69e8b5addb910b2d1c766bea76_72_88
i.e. I print a warning and create a dummy test that just always skip and then avoid building the executable and test.
The logic seems unnecessarily complicated. I could imagine a "skip" parameter for test, to just skip (ignoring all other parameters). Though in this case I would also need to skip building the corresponding C file, which could be a bit uglier again.
Contributor guide
Research direction
Review the linked libfprint commit and Meson's existing test and build-parameter handling first. Define how a test-level skip should behave when dependencies are missing, including whether its corresponding C source is built; done means dependency-dependent tests can be skipped without dummy tests or unnecessary executables.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100