-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat(ThirdParty): Unity unit test #1033
base: main
Are you sure you want to change the base?
Conversation
Hey @Jake-Carter , I want to integrate unity into our SDK so we can have, and offer a unit test framework. I have it working ok, but it would benefit a lot more if we can integrate it better into the build system. I updated the libs.mk to include the lib. You can run the tests on target, but it is definitely meant to be ran on the PC. Looking for some pointers or help trying to integrate this better. |
/clang-format-run |
Sounds good, I'll take a look |
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.
@EricB-ADI seems easy enough to integrate. Some comments/questions below. Looks like we may need to just assign some custom printing configuration macros to our printf/UART drivers
Just realized it got added as a submodule and none of the folders are there. Yes I did make a unity.mk. |
This should make more sense now. |
/clang-format-run |
done |
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.
Did you test the example in Keil and IAR (judging by the example's project files)?
If not, I'd recommend deleting those files from the example because it's still TBD how we'll handle IAR and Keil with the SDK. I don't know if we'll continue using the old setup we used to have. Code delivery and setting up a system to sync the codebase for IAR/Keil with GitHub hasn't been officially decided yet (mainly due to a lack of resources).
Also, don't forget to update the boards' examples.txt with the new example.
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.
Extra file?
Removed Unity from the linter. |
… for target micro vs host PC
… to prevent hard faults on failures
@EricB-ADI pushed my latest changes. Streamlined the integration with the host PC and added some documentation to the UG. Also slightly modified the example and options. Of note are some updates to the unity config in 274b74f. I was seeing hard faults on the host micro from those Works well on my target micro and host machine. Have you already developed some way to check the return code of a micro's main function when it's under debug? This would be a useful addition to the documentation for developing automated hardware-in-the-loop testing with this framework. |
Thanks for
I have not, but I suspect we can do it by checking the register after a return. I have some pyocd automation scripts so I may take a look at that to see what happens. |
Sounds good. I poked around r0-r3 a bit but didn't pick out a consistent pattern. I was hoping GDB would exit and pass through the return code but the micro just goes into Lmk if you find anything, otherwise I think we can add some documentation on parsing the serial output. |
It should be pretty easy to make an automation script with GDB to break at |
Pull Request Template
Description