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.