-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
codegen: rework ABI tests to use a single C program for each test #1050
Conversation
A successful run after a regen can be seen here: https://github.com/pbor/gtk-rs/runs/1845572278?check_suite_focus=true |
Can you put a WIP PR of gtk-rs up with the changes this would do? |
This was also the case before as mentioned on IRC, but AFAIU you unconfused yourself since then? :) |
Looks OK otherwise, even simpler and cleaner than before in |
4adcbf8
to
b4d02c2
Compare
|
8b63cda
to
10949df
Compare
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.
Looks good to me apart from gtk-rs/gtk3-rs#293 (comment)
Instead of compiling a C program for each layout and one for each constant to check, generate a single layout.c and a single constant.c which output all the values, one per line. On the rust side, it is easier to compile and run the C program just once and then parse its output one line at a time to compare with the corresponding rust record.
This is a first step in the plan outlined in #1047
Instead of compiling a C program for each layout and one for each
constant to check, generate a single layout.c and a single
constant.c which output all the values, one per line.
On the rust side, it is easier to compile and run the C program
just once and then parse its output one line at a time to compare
with the corresponding rust record.
Note also that C programs are now taken by the system's header
files (eg atk.h) rather than from
-DATK_FOO=1
passed by thetest itself. I think this is actually the right thing to check
since that is the real value we want to compare with.
However this also means that the test will fail when run on
a system older than the one used to generate the gir files, since
some constants may not present in the headers.