I'm a little acquainted with how you would use a unit test framework when the code you're testing runs natively on your host. So how do you use a unit test framework when the code is intended to run on a target system?
For example, the Cxxtest framework is a perl script that parses your code base, looking for any function that begins with "test" to add to the test suite, and it creates an executable that will run those tests. I haven't used it myself, though I'm told you typically tie it in to your build system so whenever you build you get your normal executable plus your tests are build and executed. If the tests fail, the build fails, and it reports stats and points you to where the failures happened.
So when you use a unit test framework for embedded software, what changes? Do you build with your cross-compiler, get an executable with the tests, download them to your target, and run them? Or do you build them natively on your host and run them there? Or some of each?
Thanks,
- J