Repository navigation
Add support for generating layout tests in a different file - #3493
DanielEScherzer wants to merge 1 commit into
Conversation
2d2aafa to
3fd372e
Compare
Add a new command line flag, `--separate-layout-tests-path`, and a new builder method, `separate_layout_tests_path()`, to set the path for layout tests. Unlike when wrapping static functions, an explicit path is required for the layout tests to be put in a different file, with no fallback to a temporary file. Separate layout tests are expected to be useful in projects where the bindings are included in version control, in which case the `include!` of the generated file would break if that file wasn't also present. Fixes rust-lang#1655
There was a problem hiding this comment.
I'm a bit confused about the goal here. If you want to check in the bindings into source control, you do need to avoid layout tests anyway because those are fundamentally target specific, right?
To be honest, the bindings are likely target specific in practice too (due to padding etc that it might add, but...).
Is the idea that you'd run bindgen once with the layout tests somewhere else then don't check-in the layout tests? Or... something else?
My goal was to make changes to the bindings in the source control easier to read by not filling the diff with changes to the layout tests, they can still be checked in |
|
☔ The latest upstream changes (possibly #3519) made this pull request unmergeable. Please resolve the merge conflicts. |
Add a new command line flag,
--separate-layout-tests-path, and a new builder method,separate_layout_tests_path(), to set the path for layout tests. Unlike when wrapping static functions, an explicit path is required for the layout tests to be put in a different file, with no fallback to a temporary file. Separate layout tests are expected to be useful in projects where the bindings are included in version control, in which case theinclude!of the generated file would break if that file wasn't also present.Fixes #1655