1

I want to run some code coverage analysis (using CoverStory) on our iPhone app's unit tests in XCode automatically when the tests run. the problem is that we're using the Google Toolbox for Mac, and the way that the tests seem to run doesn't actually generate code coverage reports from gcov, so the analysis i get is out of date unless i manually regenerate the coverage html after a build and go. I'm wondering if there is any obscure way to trigger a post-debug step that would do this for me so i don't have to manually rerun CoverStory. Is it possible?

Edit: To clarify, i want to have a build step run after the program is done running if possible, not before i start debugging.

Kevlar
  • 8,804
  • 9
  • 55
  • 81

1 Answers1

2

Yes, you can easily add build steps.

In the targets folder, select your target and then right click -> Add | New build phase | New run script phase..."

You can type any shell commands into the resulting script phase by doubleclicking on it. This is how the Unit Tests are run.

alt text http://img178.imageshack.us/img178/9718/addbuildphase.png

Rog
  • 17,070
  • 9
  • 50
  • 73
  • Thanks for the response, but i want to ensure that the build step runs after the test application finishes running/debugging, which is not readily apparent to me at the moment. – Kevlar Apr 24 '09 at 18:35
  • I've not tested but if you add a run script phase after the script that runs SenTest (or just edit the script that runs SenTest) don't you get the correct behaviour? – Rog Apr 24 '09 at 19:42
  • I was under the impression that the script that runs the unit tests didn't generate the gcov files, but it appears that is the case so this will suffice; thanks! – Kevlar Apr 27 '09 at 18:58