Skip to content
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

build: Add a new "tests" option to disable building tests #2582

Closed
wants to merge 1 commit into from

Conversation

wavexx
Copy link
Contributor

@wavexx wavexx commented Nov 2, 2023

I have a script that rebuilds mu a few times, and during one of the stages I don't run tests, so I'd like to skip building them too. I'm a complete noob with meson: I kind of expected to be able to find a built-in way to skipping the build of tests, but I couldn't find any.

This adds a new "tests" feature option, which defaults to auto. When explicitly set to "disabled" it will skip the test definitions. It's kind of ugly IMHO, essentially moving all test definitions inside if blocks...

It was just an experiment on my side so I don't think much of this. Still, might be useful for packaging mu.

@progfolio
Copy link
Contributor

progfolio commented Jan 27, 2024

Agree that it would be nice to have more options to easily disable aspects of build script (e.g. tests, byte-compilation, etc). I'm not that familiar w meson/ninja myself, either, so is this already possible @djcb ?

@djcb
Copy link
Owner

djcb commented Jan 27, 2024

I took the idea here and added a slightly different implementation (using sub directories); so you can build with -Dtests=disabled

@djcb djcb closed this Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants