BullseyeCoverage Up Contents Search

Apple Xcode

Set COVFILE

To set the COVFILE environment variable, use this command in the Terminal application:

echo "COVFILE=$HOME/test.cov" >"$HOME/BullseyeCoverageEnv.txt"

This command locates the coverage file in your home directory. Adjust the COVFILE setting to suit your needs. For example, you may wish to locate the file in your project directory.

Configuring Xcode

By default, the BullseyeCoverage install program modifies the Xcode installation so that it can build with BullseyeCoverage.

tar -xf BullseyeCoverage-*-macOS.tar
sudo BullseyeCoverage-*/install

Only the active Xcode installation is modified, as identified by xcode-select --print-path. By default, the location of the changes is /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr.

Unconfiguring Xcode

Before uninstalling BullseyeCoverage, run the BullseyeCoverage/uninstall program to remove the BullseyeCoverage integration changes and restore Xcode. For example:

sudo /Applications/BullseyeCoverage/uninstall
sudo rm -fr /Applications/BullseyeCoverage

Building with Xcode IDE

Use the Coverage Browser to enable coverage build and then rebuild as usual.

Building with xcodebuild

Add BullseyeCoverage to the front of the PATH environment variable, enable coverage build and rebuild as usual.

PATH=/Applications/BullseyeCoverage/bin:$PATH
cov01 -1
xcodebuild ... clean ...
xcodebuild ... build ...
cov01 -0

Updated: 23 Oct 2020