how to collect code coverage on physical iPhone with Apple LLVM Compiler 3.0?

588 views Asked by At

Does latest XCode's Apple LLVM compiler 3.0 support collecting code coverage data from physical iPhone machine? If yes, how to set it up?

Below gives a solution for gcc compiler. But I want to know whether this is a workable way for LLVM compiler 3.0. Because for our project, when switching from llvm compiler to LLVM gcc, we got some compiling errors, so we'd like to stick to apple's llvm compiler.

https://stackoverflow.com/questions/5101014/code-coverage-not-showing-results-using-xcode- gcov/5140459#5140459

I found a solution for this. http://www.gerardcondon.com/blog/2012/02/21/code-coverage-updates-for-xcode-4-dot-3/

And I can get the coverage data from device now. But met another issue when parsing the gcdata. The gcdata collected is marked as 4.2 version, while the gcno files generated by Apple Compiler 3.0 is 4.4. When using lcov which calls gcov(by default 4.2.1) to generate cov info file, it failed to parse the gcdata. I have tried to install a new version of gcov(gcc4.4.7), but still failed. I am still doing some investigation on this. Hope I don't need to write my own lcov. :-)

Thanks.

0

There are 0 answers