-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
meson: Allow tests to be optional #692
base: main
Are you sure you want to change the base?
Conversation
option('tests', | ||
description: 'Build the test suite', | ||
type: 'boolean', | ||
value: true | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are always optional, you never have to run them. What's the goal here? Just to avoid compiling the test programs by default?
I would suggest instead setting build_by_default: false
for test progs. Meson 1.7 won't build them by default anymore, if you do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
1.7 is too new for me to benefit from it and still only rc
I think I will have to veto this. I always want the tests to be compiled - to at least have them build is the easiest way to find any issues early instead of shipping something broken onto systems which might then break in subtle ways. Of course, people may not run the tests after build, but that risk is up to the people building the code ;-) Is there any reason why you don't want to even build the tests? They are extremely quick to compile and quite lightweight. |
TBH I'm not sure I understand the distinction. Distributors want to run tests after build too, obviously, as they don't like regressions either. But it's possible to toggle them off if e.g. you've already run it (or someone else has), and skipping them saves you on 24 compile jobs (8 tests times 2 sources + 1 link stage). It may not be the biggest deal in the world, but it's not nothing. Again, tagging them as |
That is what it is doing by default so I don't think it changes anything on your end other than having 2 extra options. As you said anyone who turned them off when building will do so knowingly. Having an option to not compile them by default saves some time, if you have to do repeated rebuilds from scratch of things where appstream is a dependency. It is not a very significant time saved right now but I think it is worth providing an option. The other thing is installed-tests being installed which is being worked around eg. see https://gitlab.alpinelinux.org/alpine/aports/-/blob/4aa55390052999d340a4670a33538f1583f17dcb/community/appstream/APKBUILD#L69 |
No description provided.