-
Notifications
You must be signed in to change notification settings - Fork 745
Get CI working with libclang 4.0 #697
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
Comments
Thanks for laying this out, @emilio! I prefer subdirectories over suffixes for different test expectations across different libclang versions. Once libclang 4.0 is passing in CI, we should look at testing (and allowing failures?) of libclang 5.0 tip. Additionally, once we have the infrastructure to allow different libclangs to have different test expectations, we can also turn on CI for libclang 3.7 (and even 3.6?). Because updating test expectations will be harder (will require wrangling multiple libclang versions), we must ensure that our diff printing behavior when actual emitted bindings != expected emitted bindings is preserved. This allows one to update test expectations even when one doesn't have the particular libclang version handy. We should describe this process in CONTRIBUTNG.md. |
Rather than having a tests that we only run if libclang >= 3.9, this makes the test suite dynamically detect when we have different expectations for different libclang versions. It does this by adding `tests/expectations/tests/libclang-$VERSION` directories, and `testing_only_libclang_$VERSION` features that are consulted when the usual expectation file does not exist. Fixes rust-lang#697
Rather than having a tests that we only run if libclang >= 3.9, this makes the test suite dynamically detect when we have different expectations for different libclang versions. It does this by adding `tests/expectations/tests/libclang-$VERSION` directories, and `testing_only_libclang_$VERSION` features that are consulted when the usual expectation file does not exist. Fixes rust-lang#697
With #696 and #694, we should be able to pass tests in libclang 4.0.
There are a few tests which are expected to have different output in this clang version, mentioned in #696.
We have right now in our headers a
// bindgen-unstable
annotation, that basically avoids running tests depending on a feature, which we enable depending on the LLVM version in CI. We'd need to extend/refactor this in order to support multiple expectation files per platform.One alternative is using a subdirectory, something like:
And so on.
Other alternative is just using name suffixes:
When that's done, we need to setup CI for libclang 4.0, which is probably just a matter of removing the relevant line from the
allow_failures
section.The text was updated successfully, but these errors were encountered: