Skip to content

Commit 1e674e9

Browse files
committed
Minor tweaks to Matthew Purland's post-run script, and instructions to set "Provide build settings from"
1 parent 3e29cd2 commit 1e674e9

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,11 @@ If you make changes to your production code, you should clear out all build
3535
artifacts before measuring code coverage again. "Clean Build Folder" by holding
3636
down the Option key in Xcode's "Product" menu.
3737

38-
* Optional: Run code coverage after running unit tests
38+
**Optional:** Run code coverage after running unit tests:
39+
3940
* Edit Xcode scheme -> Test -> Post-actions
40-
* Set shell to: ``/bin/bash``
41+
* Set "Shell" to: ``/bin/bash``
42+
* Set "Provide build settings from" to your main target
4143
* Set script to:
4244
``source ${SRCROOT}/XcodeCoverage/run_code_coverage_post.sh``
4345

run_code_coverage_post.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/bash
22
x=`/usr/bin/osascript <<EOT
33
tell application "Finder"
4-
activate
5-
set myReply to button returned of (display dialog "Generate Code Coverage Report")
4+
activate
5+
set myReply to button returned of (display dialog "Generate code coverage report?")
66
end tell
77
EOT`
88
if [[ $x = "OK" ]]; then
9-
echo 'Generating code coverage report'
10-
cd ${SRCROOT}/XcodeCoverage && ./getcov
9+
echo 'Generating code coverage report'
10+
${SRCROOT}/XcodeCoverage/getcov
1111
fi
1212
echo 'Done.'

0 commit comments

Comments
 (0)