gcovr和Xcode 5的代码覆盖不起作用 [英] code coverage with gcovr and Xcode 5 is not working

查看:94
本文介绍了gcovr和Xcode 5的代码覆盖不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用gcovr为cobertura生成代码覆盖率。
xcode 4.6一切正常。现在我更新到xcode5,得到的所有内容都是0%覆盖率...

I'm using gcovr to generate code coverage for cobertura. Everything was working fine with xcode 4.6. Now I updated to xcode5 and everything I get is 0% coverage...

我的设置:


  • gcovr 3.0

  • Xcode 5(Apple LLVM 5)

  • 生成测试覆盖率文件设置为是

  • 仪器程序流设置为YES

  • gcovr 3.0
  • Xcode 5 (Apple LLVM 5)
  • 'Generate Test Coverage Files' is set to YES
  • 'Instrument Program Flow' is set to YES

并命令我使用:

and to command I use:

gcovr -r . --object-directory Build/Intermediates/myApp.build/Debug-iphonesimulator/myApp.build/Objects-normal/i386 --exclude '.*Tests.*' --exclude '.*KiwiUnitTest' --exclude '.*main.*' --xml > reports/coverage.xml

有人遇到同样的问题或更好的解决方案吗? :)

is someone having the same issue or better, have a solution? :)

推荐答案

现在又可以使用了... :)

And now it works again... :)

@kenji 所说,Xcode 5.1解决了这个问题。 thx btw

as @kenji said, Xcode 5.1 solved the problem. thx btw

这是我感兴趣的人的工作环境和配置

here is my working environment and configuration for the one who are interested


  • Xcode 5.1.1(来自AppStore)

  • gcovr 3.1-prerelease(已安装easy_install)

,然后在我的项目的 Build Settings下,设置以下内容:

and in my project under 'Build Settings' I set the following:


  • Generate Test Coverage Files设置为YES

  • 仪器程序流设置为是

在运行测试后,我执行以下命令:(发生詹金斯事件)

after I run the tests, I execute the following command: (happens with jenkins)

gcovr -r . --object-directory Build/Intermediates/MyProj.build/Debug-iphonesimulator/KiwiUnitTest.build/Objects-normal/i386 --exclude '.*Tests.*' --exclude '.*KiwiUnitTest' --exclude '.*main.*' --xml > reports/coverage.xml

完成。

对不起,让您久等了,并感谢大家的帮助。

sorry guys for making you wait for an answer and thank you everyone for your help.

这篇关于gcovr和Xcode 5的代码覆盖不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆