Create unit test framework by reusing embunit in RIOT submodule - #11
Open
kb2ma wants to merge 2 commits into
Open
Create unit test framework by reusing embunit in RIOT submodule#11kb2ma wants to merge 2 commits into
kb2ma wants to merge 2 commits into
Conversation
Contributor
Author
|
Two updates:
|
Contributor
|
@kaspar030: what do you think about this PR? I think having unittests for nanocoap is quite helpful. Alternative could be to simply move nanocoap into RIOT and use the existing infrastructure :-) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on the recent addition of uint parsing for the Observe option, it really seemed like time to add unit testing. This commit adds the basic framework, and then I'll follow-on with an Observe-specific test.
This commit adds a top level
testsdirectory for unit tests. The tests depend on reuse of the embunit framework in the RIOT submodule. Thetests/embunitdirectory includes Makefiles to build the framework from that source.I also added the ability to compile nanocoap source to object files in the nanocoap Makefile. This compilation is only called by the unit test Makefile as needed. I also added a section in the README to describe setup and use.
I'm sure the Makefiles can be streamlined, but hey, it's a start, and definitely worthwhile!