How to set up gcov for code coverage analysis in iPhone SDK?

前端 未结 1 1025
耶瑟儿~
耶瑟儿~ 2020-12-18 03:51

I\'ve recently begun unit testing an app I write for the iPhone. I have the basics of creating my own tests down, even if it seems a little sub-optimal. I am, however, havin

相关标签:
1条回答
  • 2020-12-18 04:37

    The solution is that these guides refer to running code in the iPhone simulator. Because I'm running application level tests, I'm cross-profiling and need to follow this information.

    I then set the environment variable GCOV_PREFIX to dump it in my application's Documents directory, and then I use the Organizer in Xcode to download my app's package from the device to get the .gcda files out of the Documents directory. This is rather cumbersome and hardly lends itself to automatic coverage testing, but it is the only solution I can see given the constraints of running in a sandbox and using classes that are only available for testing on the device (namely MediaPlayer.framework).

    0 讨论(0)
提交回复
热议问题