I've recently begun unit testing an app I write for the iPhone. I have the basics of creating my own tests down, even if it seems a little sub-optimal. I am, however, having real trouble setting up code coverage analysis using gcov.
I followed the instructions here: http://www.cubiclemuses.com/cm/articles/2009/05/14/coverstory-on-the-iphone/, which are repeated very similarly in other places. I've tried using Google's AppleScript from their toolbox for Mac to do it just in case I was entering something wrong in Xcode.
I've used Apple's iPhoneUnitTests sample as a base project, and simply running Google's AppleScript to enable code-coverage testing against the CalcTests target to get a well-sourced, automated example of it not working. No matter what scenario I use, my own code, Apple's, manually setting the proper variables or letting Google's AppleScript do it for me, all I get are these errors in the debug console once the tests are finished running:
profiling:/Users:Cannot create directory
profiling:/Users/jpo/Downloads/iPhoneUnitTests/build/iPhoneUnitTests.build/Debug-iphoneos/CalcTesting.build/Objects-normal/armv6/CalcViewController.gcda:Skip
profiling:/Users:Cannot create directory
profiling:/Users/jpo/Downloads/iPhoneUnitTests/build/iPhoneUnitTests.build/Debug-iphoneos/CalcTesting.build/Objects-normal/armv6/Calculator.gcda:Skip
profiling:/Users:Cannot create directory
profiling:/Users/jpo/Downloads/iPhoneUnitTests/build/iPhoneUnitTests.build/Debug-iphoneos/CalcTesting.build/Objects-normal/armv6/CalcAppDelegate.gcda:Skip
profiling:/Users:Cannot create directory
profiling:/Users/jpo/Downloads/iPhoneUnitTests/build/iPhoneUnitTests.build/Debug-iphoneos/CalcTesting.build/Objects-normal/armv6/main.gcda:Skip
The gcda files are not created, and thus I have nothing to analyze.
Any help with this would be greatly appreciated.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…