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

Create unit test framework by reusing embunit in RIOT submodule #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

kb2ma
Copy link
Contributor

@kb2ma kb2ma commented Jan 28, 2017

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 tests directory for unit tests. The tests depend on reuse of the embunit framework in the RIOT submodule. The tests/embunit directory 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!

@kb2ma
Copy link
Contributor Author

kb2ma commented Jan 29, 2017

Two updates:

  1. Added .gitignore to initial commit and squashed.
  2. Added commit for Observe registration test.

@haukepetersen
Copy link
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 :-)

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.

None yet

2 participants