Skip to content

Commit 05e309b

Browse files
committed
Move definition of LCOV_INFO to getcov, where it can now be changed with the -i argument
1 parent d572a29 commit 05e309b

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Xcode Project Setup
99
Before you get started, there are a couple of steps you will need to take to prepare your project:
1010

1111
1. Depending on your version of Xcode, you may need to get Xcode's coverage instrumentation by going to Xcode > Preferences, into Downloads, and installing Command Line Tools. If you do not see this as an option in the Downloads section, the tools should already be installed.
12-
4. In your Xcode project, enable these two build settings at the project level for your Debug configuration only:
12+
2. In your Xcode project, enable these two build settings at the project level for your Debug configuration only:
1313
* Instrument Program Flow
1414
* Generate Test Coverage Files
1515

@@ -19,7 +19,7 @@ Installation: Standard
1919

2020
1. Fork this repository; you're probably going to want to make your own modifications.
2121
2. Place the XcodeCoverage folder in the same folder as your Xcode project.
22-
5. In your main target, add a Run Script build phase to execute `XcodeCoverage/exportenv.sh`
22+
3. In your main target, add a Run Script build phase to execute `XcodeCoverage/exportenv.sh`
2323

2424
A few people have been tripped up by the last step: Make sure you add the script to your main target (your app or library), not your test target.
2525

@@ -65,10 +65,8 @@ If you make changes to your production code, you should clear out all build arti
6565
Modification
6666
============
6767

68-
There are two places you may want to modify the included files if you are using the standard installation:
68+
If you are using the standard installation, you may wish to modify `exclude_data()` in `getcov` to specify which files to exclude, for example, third-party libraries.
6969

70-
1. In `envcov.sh`, `LCOV_INFO` determines the name shown in the report.
71-
2. In `getcov`, edit `exclude_data()` to specify which files to exclude, for example, third-party libraries.
7270

7371
Credits
7472
=======

envcov.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,6 @@
55
scripts="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
66
source "${scripts}/env.sh"
77

8-
# Change the report name if you like:
9-
LCOV_INFO=Coverage.info
10-
118
LCOV_PATH="${scripts}/lcov-1.11/bin"
129
OBJ_DIR="${OBJECT_FILE_DIR_normal}/${CURRENT_ARCH}"
1310

getcov

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ generate_report() {
6262
scripts="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
6363
source "${scripts}/envcov.sh"
6464

65+
LCOV_INFO=Coverage.info
6566
OUT_DIR="${BUILT_PRODUCTS_DIR}"
6667
while [ "$1" != "" ]; do
6768
case $1 in

0 commit comments

Comments
 (0)