Xcode5 Code Coverage (from cmd-line for CI builds)

后端 未结 6 1594
广开言路
广开言路 2020-12-14 03:48

How can I generate code coverage with Xcode 5 and iOS7?

Prior to upgrading I was getting code coverage just fine. Now I can\'t see any *.gcda files being produced.

6条回答
  •  轮回少年
    2020-12-14 04:27

    We found that we had to add a bit of code to get the gcda files to flush from the system.

    Code addition is to add extern void __gcov_flush(); to the top of your file and then call __gcov_flush(); just before the entire test suite exits.

    Full explanation is here: http://www.bubblefoundry.com/blog/2013/09/generating-ios-code-coverage-reports/

提交回复
热议问题