meson
meson copied to clipboard
meson test TEST returns 0 if TEST does not exist
Hello,
I just discovered that running meson test TEST returns 0 even if TEST does not exist.
A clear No suitable tests defined. message is outputted to the user.
Would it not make more sense to return non-zero in this case? The current behavior can be misleading, as users will most probably expect that the test has been executed successfully, not that it has not been executed at all — notably in CI scripts.
Tested version
- meson-0.49.2
- ninja-1.8.2
ctestalso returns 0 for no tests foundpytestreturns 5 for no tests found
I also prefer to return non-zero for no tests found...
This seems like a reasonable change. It should be simple to implement, a few lines of code to mtest.py. Pull requests welcome.
Anyone have a PR for this yet? If not, I'll do it.
There was a PR #4927, but that never landed. I don't know of any other PRs
This was fixed by #11647.