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

Unit test fixes to support CAN mapping fixes #44

Merged
merged 7 commits into from
Jun 24, 2024

Conversation

davefiddes
Copy link
Contributor

A variety of unit test improvements to cover the work in libopeninv covered by PR#18.

This will cause builds to fail until the libopeninv PR is merged and the project updated to use it.

Update the test_vcu unit test to follow recent
evolution of CAN and libopencm3 interface changes.

Update the Makefile to reflect the current names of
the CTRL_xxx defines and add the new
GITHUB_RUN_NUMBER define.

Ensure that the GitHub Action builds and runs the unit
tests again.

Tests:
 - Build and run the updated unit tests

demuddle CI changes
To allow more than one unit test that accesses the
CAN hardware move the stub implementation into its
own module.

Tests:
 - Run the updated unit tests
For a wide variety of little/big-endian, offsets and
lengths verify that mapping these into a CAN frame
results in the expected contents.

Tests:
 - Verify many failures are reported, clearly when
    running the current libopeninv
 - Verify no failures with the fixes in libopeninv PR#18
For a wide variety of little/big-endian, offsets and
lengths verify that mapping a parameter from  a CAN frame results in the expected contents.

Tests:
 - Verify many failures are reported, clearly when
    running the current libopeninv
 - Verify no failures with the fixes in libopeninv PR#18
When unit tests use std::hex to print failure
information the line numbers printed by the ASSERT()
macro are printed in hex as well. This is less than
helpful so ensure they are always printed in decimal.
Validate all of the different ways it is possible to
incorrectly specify a can mapping through the "can tx"
or "can rx" command with a unit test.

Tests:
 - Verify many failures are reported, clearly when
    running the current libopeninv
 - Verify no failures with the fixes in libopeninv PR#18
@jsphuebner jsphuebner merged commit 5847e01 into jsphuebner:master Jun 24, 2024
1 check failed
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.

2 participants