add skip kw to test function
I don't understand the purpose of this feature.
What does "to keep the test in the list of available tests" mean? It's not actually available. Why is it being skipped? Does it not work? Shouldn't it be marked as EXPECTEDFAIL after running and failing? This also means that you know when it starts working (UNEXPECTEDPASS is an error). Is the test missing some requirements? We have a way for the test itself to communicate this at runtime rather than hardcoding it in the test definition.
If none of this is suitable, and you just want to keep the test in meson.build, why not comment it out?
In my monorepo, I have a suite of python tests needing pytest for running them. If pytest is not found, I cannot run the tests, but I don't want to prevent other parts of the project being configured. I could just put the test into a conditional block, but then trying to run it would result in an error that the test does not exist. With a conditional skip: not pytest.found(), the test still exists, but will not try to run if pytest is not there, and will be reported as skipped, so I know some tests did not run at all.
I was referred to this PR from here. I just want to support this feature, it addresses a need that we have identified.
It would be nice if a reason for the skip could also be given (like in my prototype patch), by an additional string argument somewhere. But that might be out of scope for this patch, looking at how the code is structured.
rebased and targeted for 1.4.0