This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Unit testing in the target?



Hi folks,

I'm looking for information that might help to develop unit tests (for C/C++) that can be run in the target processor (Delfino.) Has anyone found unit testing frameworks that are embeddable?

Most of the search results I find for unit testing (even for embedded systems) seem to involve running code on the development host where complete libraries and standard output are available. We plan to do that too, but we would also like to perform some unit tests on the target itself. In our case we are not using an RTOS but do have a custom kernel. For testing however we would probably not use it and mock calls to it.

I have found information on scripting the build (processors.wiki.ti.com/.../Create) and the debug session (processors.wiki.ti.com/.../Debug_Server_Scripting) and those seem to answer the automation portion of this effort. (Did I mention that we want to automate build and unit testing?) Beyond that I have found a few threads that seem to address this.

https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/429751 discusses using JUnit based testing. I think this means using JUnit on the host since it integrates with DSS. It seems to me that it would still be required to write custom unit tests and script execution and collection/evaluation of results to provide to the JUnit harness, is this correct?

https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/456886/1646916 describes writing a custom unit test.

https://e2e.ti.com/support/development_tools/code_composer_studio/f/81/t/238641 seems to pose the same question: Are there any embeddable unit test frameworks which could be employed within CCS and run on the target?

Finally, this post https://www.researchgate.net/post/Which_unit_testing_framework_do_you_prefer_for_embedded_systems seems to state that custom tests are the only way to go.

Before I head down that path, I thought I'd ask about what presently exists. I'd rather not reinvent the wheel if I can find one that sort of meets our needs.

Thanks!