<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Unit Testing and Code Coverage with Xcode</title>
	<atom:link href="http://www.supermegaultragroovy.com/blog/2005/11/03/unit-testing-and-code-coverage-with-xcode/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.supermegaultragroovy.com/blog/2005/11/03/unit-testing-and-code-coverage-with-xcode/</link>
	<description>Chris Liscio's Boo-urns Log</description>
	<lastBuildDate>Mon, 01 Mar 2010 15:21:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Unit testing and coverage with XCode &#124; Michael Tyson</title>
		<link>http://www.supermegaultragroovy.com/blog/2005/11/03/unit-testing-and-code-coverage-with-xcode/comment-page-1/#comment-83782</link>
		<dc:creator>Unit testing and coverage with XCode &#124; Michael Tyson</dc:creator>
		<pubDate>Sun, 29 Nov 2009 17:53:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.supermegaultragroovy.com/blog/?p=57#comment-83782</guid>
		<description>[...] just got coverage working too, thanks to a useful article at SuperMegaUltraGroovy on how to use code coverage with XCode. There were a couple of caveats that I thought I&#8217;d share, though.  So, to repeat SMUG&#8217;s [...]</description>
		<content:encoded><![CDATA[<p>[...] just got coverage working too, thanks to a useful article at SuperMegaUltraGroovy on how to use code coverage with XCode. There were a couple of caveats that I thought I&#8217;d share, though.  So, to repeat SMUG&#8217;s [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.supermegaultragroovy.com/blog/2005/11/03/unit-testing-and-code-coverage-with-xcode/comment-page-1/#comment-83780</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 29 Nov 2009 16:57:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.supermegaultragroovy.com/blog/?p=57#comment-83780</guid>
		<description>Oh yes, the other thing: I originally got build errors after following these directions: 

  &quot;_vproc_transaction_begin&quot;, referenced from:
      ___gcov_init in libgcov.a(_gcov.o)
      _vproc_transaction_begin$non_lazy_ptr in libgcov.a(_gcov.o)
  &quot;_vproc_transaction_end&quot;, referenced from:
      _gcov_exit in libgcov.a(_gcov.o)
      _vproc_transaction_end$non_lazy_ptr in libgcov.a(_gcov.o)
ld: symbol(s) not found


Turns out (http://lists.apple.com/archives/xcode-users/2009/Sep/msg00066.html), the active SDK has to be the same as the current OS; setting it to 10.6 resolved the problem.</description>
		<content:encoded><![CDATA[<p>Oh yes, the other thing: I originally got build errors after following these directions: </p>
<p>  &#8220;_vproc_transaction_begin&#8221;, referenced from:<br />
      ___gcov_init in libgcov.a(_gcov.o)<br />
      _vproc_transaction_begin$non_lazy_ptr in libgcov.a(_gcov.o)<br />
  &#8220;_vproc_transaction_end&#8221;, referenced from:<br />
      _gcov_exit in libgcov.a(_gcov.o)<br />
      _vproc_transaction_end$non_lazy_ptr in libgcov.a(_gcov.o)<br />
ld: symbol(s) not found</p>
<p>Turns out (<a href="http://lists.apple.com/archives/xcode-users/2009/Sep/msg00066.html" rel="nofollow">http://lists.apple.com/archives/xcode-users/2009/Sep/msg00066.html</a>), the active SDK has to be the same as the current OS; setting it to 10.6 resolved the problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael</title>
		<link>http://www.supermegaultragroovy.com/blog/2005/11/03/unit-testing-and-code-coverage-with-xcode/comment-page-1/#comment-83779</link>
		<dc:creator>Michael</dc:creator>
		<pubDate>Sun, 29 Nov 2009 16:52:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.supermegaultragroovy.com/blog/?p=57#comment-83779</guid>
		<description>Great tip, cheers.

I added a bit of text processing to make the output a little more readable:

 find &quot;${OBJROOT}&quot; -name *.gcda -exec gcov -o &quot;${OBJ_DIR}&quot; {} \; &#124; egrep &quot;^File&#124;^Lines&quot; &#124; sed -E &quot;s@File &#039;$SRCROOT/@@;s@(\.[a-zA-Z])&#039;@\1: @;s@Lines executed:([0-9.%]+) of ([0-9]+)@\1 (\2)@&quot; &#124; paste -d&quot; &quot; - - &#124; sed -E &quot;s@^([^:]+):([^(]*)(\([^)]+\))@\2:\1\3@&quot; &#124; sort -n &#124; sed -E &quot;s@^([^:]+):([^(]*)(\([^)]+\))@\2:\1\3@&quot;

Rather complicated looking command line, but it produces output like the following, sorted by coverage percentage (lowest first):

Classes/TSClassFile.m:  0.82% (243)
Classes/TSSomeOtherFile.m:  0.89% (676)</description>
		<content:encoded><![CDATA[<p>Great tip, cheers.</p>
<p>I added a bit of text processing to make the output a little more readable:</p>
<p> find &#8220;${OBJROOT}&#8221; -name *.gcda -exec gcov -o &#8220;${OBJ_DIR}&#8221; {} \; | egrep &#8220;^File|^Lines&#8221; | sed -E &#8220;s@File &#8216;$SRCROOT/@@;s@(\.[a-zA-Z])&#8217;@\1: @;s@Lines executed:([0-9.%]+) of ([0-9]+)@\1 (\2)@&#8221; | paste -d&#8221; &#8221; &#8211; - | sed -E &#8220;s@^([^:]+):([^(]*)(\([^)]+\))@\2:\1\3@&#8221; | sort -n | sed -E &#8220;s@^([^:]+):([^(]*)(\([^)]+\))@\2:\1\3@&#8221;</p>
<p>Rather complicated looking command line, but it produces output like the following, sorted by coverage percentage (lowest first):</p>
<p>Classes/TSClassFile.m:  0.82% (243)<br />
Classes/TSSomeOtherFile.m:  0.89% (676)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bookmarks for August 26th through September 1st &#124; ??? ?? ? ??</title>
		<link>http://www.supermegaultragroovy.com/blog/2005/11/03/unit-testing-and-code-coverage-with-xcode/comment-page-1/#comment-78237</link>
		<dc:creator>Bookmarks for August 26th through September 1st &#124; ??? ?? ? ??</dc:creator>
		<pubDate>Tue, 01 Sep 2009 04:04:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.supermegaultragroovy.com/blog/?p=57#comment-78237</guid>
		<description>[...] SuperMegaUltraGroovy &#187; Blog Archive &#187; Unit Testing and Code Coverage with Xcode &#8211; [...]</description>
		<content:encoded><![CDATA[<p>[...] SuperMegaUltraGroovy &raquo; Blog Archive &raquo; Unit Testing and Code Coverage with Xcode &#8211; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: neal</title>
		<link>http://www.supermegaultragroovy.com/blog/2005/11/03/unit-testing-and-code-coverage-with-xcode/comment-page-1/#comment-33386</link>
		<dc:creator>neal</dc:creator>
		<pubDate>Mon, 14 Apr 2008 23:12:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.supermegaultragroovy.com/blog/?p=57#comment-33386</guid>
		<description>this is a great article,  relevant today still. i would like to point out that the NATIVE_ARCH in the build script should be CURRENT_ARCH
(NATIVE_ARCH returns i386 even when building an x86_64 binary!)</description>
		<content:encoded><![CDATA[<p>this is a great article,  relevant today still. i would like to point out that the NATIVE_ARCH in the build script should be CURRENT_ARCH<br />
(NATIVE_ARCH returns i386 even when building an x86_64 binary!)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
