technocreatives / dbc-codegen

Generate Rust structs for messages from a dbc (CAN bus definition) file.
Apache License 2.0
43 stars 23 forks source link

Add cantools test setup #14

Closed marcelbuesing closed 3 years ago

marcelbuesing commented 3 years ago

Goal is basically to test unpacking and packing against the c code that is generated by cantools using rust bindings. So basically the flow is:

marcelbuesing commented 3 years ago

Wow! Amazing work! I didn't even know this tool existed sweat_smile

Are the current test failures bugs in our code? If so, let's either add an #[ignore] and merge this PR; or merge the bitvec PR first (that should fix them I guess).

I commented on two tiny nits :)

Thanks for the review. Yeah well I hope cantools is correct, otherwise it doesn't make sense to use it, but I think it's fairly widely used. Not entirely sure yet about the tests and why the results differ, but it's also not the same currently on the bitvec branch.

Anyway I think it's probably a good idea to ignore the test output for now, merge it and then make fix the bitvec branch.

killercup commented 3 years ago

Sounds good! Merging :)