I'm looking to have code coverage in C. I cannot rely on tools like gcov as I am working on different platforms/compilers.
Basically I am looking for a strategy to incorporate code coverage into my(own implementation) unit-test framework.
Do you have so many platform-specific code that you want to measure the unit test coverage on every platform ? I mean that unless you have a lot of platform-specific code, your unit testing coverage should be similar on all your targets so you might not need to measure it on each and every target you have. It could be interesting to move your platform-specific code to platform-specific modules so that the coverage level of the common code is not lowered by the specific code.
Are you looking at branch coverage or function coverage ? If the latter you can just use gcc to instrument your code so that each function outputs its name or its address to a file and write a script to aggregate the results from all the platforms.
Sorry for answering with questions only ... HTH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With