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

tests: add werror tests for several languages #13155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

bgilbert
Copy link
Contributor

@bgilbert bgilbert commented Apr 27, 2024

Followup to #13074.

@jpakkane
Copy link
Member

I'm not a fan of mxing failing tests with all the others because it adds knobs for people to twiddle, which leads to complexity, which leads to ... well you know.

The fact that all tests that are expected to fail are in one place is good, because then you can not, accidentally or otherwise, make a test in the main dir that should have passed as failing.

A simpler way of achieving the same would be to do something like:

project('foo', 'c', <enable werror>)

if add_languages('swift_or_whatever')
    <do your thing here>
else
    executable('willfailtocompile', 'source-with-a-warning.c')
endif

It's a bit unclean but keeps the overall structure cleaner.

@bgilbert
Copy link
Contributor Author

Okay, updated, with MESON_SKIP_TEST instead of a fallback source file. The add_languages() check isn't enough to replicate the existing language-specific directory skip logic; I reimplemented just enough of it to pass CI.

@bgilbert
Copy link
Contributor Author

Could this get another look?

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.

None yet

2 participants