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

feat(ThirdParty): Unity unit test #1033

Merged
merged 99 commits into from
Jan 6, 2025
Merged

feat(ThirdParty): Unity unit test #1033

merged 99 commits into from
Jan 6, 2025

Conversation

EricB-ADI
Copy link
Contributor

@EricB-ADI EricB-ADI commented Jun 3, 2024

Pull Request Template

Description

  • Included 3rd party lib unity for unit testing
  • Added unit test example

@EricB-ADI EricB-ADI added enhancement New feature, request, or updating to latest version help wanted Extra attention is needed WIP work in progress dependencies Pull requests that update a dependency file build system This issue or pull request is related to the MSDK build system labels Jun 3, 2024
@github-actions github-actions bot added MAX32655 Related to the MAX32655 (ME17) Workflow Related to Workflow development labels Jun 3, 2024
@EricB-ADI
Copy link
Contributor Author

EricB-ADI commented Jun 3, 2024

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.

@EricB-ADI
Copy link
Contributor Author

/clang-format-run

@Jake-Carter
Copy link
Contributor

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.

Sounds good, I'll take a look

@Jake-Carter
Copy link
Contributor

Copy link
Contributor

@Jake-Carter Jake-Carter left a 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

Examples/MAX32655/Unity_Test/main.c Outdated Show resolved Hide resolved
Examples/MAX32655/Unity_Test/main.c Outdated Show resolved Hide resolved
Examples/MAX32655/Unity_Test/project.mk Outdated Show resolved Hide resolved
Examples/MAX32655/Unity_Test/project.mk Outdated Show resolved Hide resolved
Examples/MAX32655/Unity_Test/test/test_runner.c Outdated Show resolved Hide resolved
Libraries/libs.mk Show resolved Hide resolved
Examples/MAX32655/Unity_Test/project.mk Outdated Show resolved Hide resolved
@EricB-ADI
Copy link
Contributor Author

Just realized it got added as a submodule and none of the folders are there. Yes I did make a unity.mk.

@EricB-ADI
Copy link
Contributor Author

This should make more sense now.

@EricB-ADI
Copy link
Contributor Author

/clang-format-run

@github-actions github-actions bot added MAX32520 Related to the MAX32520 (ES17) MAX32650 Related to the MAX32650 (ME10) MAX32660 Related to the MAX32660 (ME11) MAX32665 Related to the MAX32665 (ME14) MAX32670 Related to the MAX32670 (ME15) MAX32672 Related to the MAX32672 (ME21) labels Jun 10, 2024
@Jake-Carter
Copy link
Contributor

@EricB-ADI @crsz20 hey! Looks like I'm still getting pings for this :)

It's on feat/unity (https://github.com/analogdevicesinc/msdk/blob/feat/unity/Libraries/CMSIS/Device/Maxim/GCC/detect_os.mk)

IIRC I added it to avoid code duplication.

That error looks like MAXIM_PATH is not set. Note '/Libraries/CMSIS/Device/Maxim/GCC/detect_os.mk' vs:

include $(MAXIM_PATH)/Libraries/CMSIS/Device/Maxim/GCC/detect_os.mk

@EricB-ADI
Copy link
Contributor Author

@Jake-Carter Thanks for clearing this up! Hope Nvidia is treating you well

@github-actions github-actions bot added MAX32520 Related to the MAX32520 (ES17) MAX32570 Related to the MAX32570 (ME13) MAX32650 Related to the MAX32650 (ME10) MAX32655 Related to the MAX32655 (ME17) MAX32660 Related to the MAX32660 (ME11) MAX32665 Related to the MAX32665 (ME14) MAX32670 Related to the MAX32670 (ME15) MAX32672 Related to the MAX32672 (ME21) MAX32675 Related to the MAX32675 (ME16) MAX32680 Related to the MAX32680 (ME20) MAX78000 Related to the MAX78000 (AI85) MAX78002 Related to the MAX78002 (AI87) BLE Related to Bluetooth MAX32662 Related to the MAX32662 (ME12) Register Change This issue or pull request involves a change to the MSDK registers. MAX32572 Related to the MAX32572 (ME55) MAX32657 Related to the MAX32655 (ME30) Zephyr MSDK Zephyr related change. labels Jan 6, 2025
@EricB-ADI EricB-ADI requested review from Jake-Carter and removed request for Jake-Carter January 6, 2025 22:36
@EricB-ADI
Copy link
Contributor Author

Ok @crsz20. Updated README and it is building again

Copy link
Contributor

@crsz20 crsz20 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome stuff!

@EricB-ADI EricB-ADI merged commit 6d3c587 into main Jan 6, 2025
10 checks passed
sihyung-maxim pushed a commit to analogdevicesinc/hal_adi that referenced this pull request Jan 6, 2025
EricB-ADI added a commit that referenced this pull request Jan 10, 2025
EricB-ADI added a commit that referenced this pull request Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BLE Related to Bluetooth build system This issue or pull request is related to the MSDK build system dependencies Pull requests that update a dependency file enhancement New feature, request, or updating to latest version help wanted Extra attention is needed MAX32520 Related to the MAX32520 (ES17) MAX32570 Related to the MAX32570 (ME13) MAX32572 Related to the MAX32572 (ME55) MAX32650 Related to the MAX32650 (ME10) MAX32655 Related to the MAX32655 (ME17) MAX32657 Related to the MAX32655 (ME30) MAX32660 Related to the MAX32660 (ME11) MAX32662 Related to the MAX32662 (ME12) MAX32665 Related to the MAX32665 (ME14) MAX32670 Related to the MAX32670 (ME15) MAX32672 Related to the MAX32672 (ME21) MAX32675 Related to the MAX32675 (ME16) MAX32680 Related to the MAX32680 (ME20) MAX32690 Related to the MAX32690 (ME18) MAX78000 Related to the MAX78000 (AI85) MAX78002 Related to the MAX78002 (AI87) Register Change This issue or pull request involves a change to the MSDK registers. WIP work in progress Workflow Related to Workflow development Zephyr MSDK Zephyr related change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.