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...
my setup:
- 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... :)
as @kenji said, Xcode 5.1 solved the problem. thx btw
here is my working environment and configuration for the one who are interested
and in my project under 'Build Settings' I set the following:
after I run the tests, I execute the following command: (happens with jenkins)
done.
sorry guys for making you wait for an answer and thank you everyone for your help.
At first make sure that your .gcda and .gcno files are created!
(Check: ~/Library/Developer/Xcode/DerivedData/{YOUR-PROJECT-NAME}/Build/Intermediates/{YOUR-PROJECT-NAME}.build/Debug-iphonesimulator/{YOUR-PROJECT-NAME}.build/Objects-normal/i386 )
If they have been successfully created you need to do the following: (If not check the comments under your question)
copy the all the files from the folder i386 (full path as described above) into you workspace where your .h and .m files are.
run terminal and change you parent working directory to your workspace
run gcovr
If you are using jenkins (which i assume) this will be your further steps: Generating gcda files to view the code-coverage from XCTests in IOS with Jenkins
Let me know if you still have questions!