How to make xcode4 coding with llvm cumulative when running applications

I have code coverage in Xcode 4.2 when running libprofile_rt. I noticed that the coverage files reset for every execution of my program. This is different from how gcov worked, and something I need to work (since my tests run through a few runs of my application). Can someone point me to a way to create cumulative libprofile_rt coverage?

+4
source share
2 answers

actually looks like an existing error in LLVM: http://llvm.org/bugs/show_bug.cgi?id=11457

+2
source

You do not need to enable * libprofile_rt.dylib * and use the * -profile_rt * flag when starting a project in xCode 4.4.1 (works with iOS Simulator as a charm) Just set these flags:

Create test coverage materials: YES Instrument program flow: YES Build and run. If you run the test object of your application, * .gcda files are created automatically, since the tested application terminates, if you run the usual target, the * .gcda files are created when your application is explicitly closed (another approach is to set UIApplicationExitsOnSuspend = YES to. plist)

Note that it was well tested in a new project created using xCode 4.4.1

Code coverage files will be displayed in /Build/Intermediates/.build//. build / Objects-normal /

+1
source

Source: https://habr.com/ru/post/1390526/


All Articles