diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-02-19 15:31:29 +0200 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2016-02-19 17:40:30 +0200 |
commit | 6792d789521a104f78a9a702672672387831d78c (patch) | |
tree | e068269e371e6847f53739105aa44d80443a09e7 /scripts | |
parent | 6a2d910ccdb8a2521e1dbe4617e5bbdddb6cc4eb (diff) | |
download | qtlocation-mapboxgl-6792d789521a104f78a9a702672672387831d78c.tar.gz |
[tests] Use ENABLE_COVERAGE=1 envvar to enable coverage
This detaches coverage data collection from typical debug build.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/collect-coverage.sh | 5 | ||||
-rw-r--r-- | scripts/main.mk | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/scripts/collect-coverage.sh b/scripts/collect-coverage.sh index 65f96a0b2b..0007eebd5b 100755 --- a/scripts/collect-coverage.sh +++ b/scripts/collect-coverage.sh @@ -3,6 +3,11 @@ set -e set -o pipefail +if [ -z ${ENABLE_COVERAGE} ] ; then + echo "ENABLE_COVERAGE environment variable is not set, aborting." + exit 1 +fi + function usage() { echo "Error: LCOV and genhtml are required for generating coverage reports." if [ `uname -s` = 'Linux' ]; then diff --git a/scripts/main.mk b/scripts/main.mk index b11e9053a0..de49c9967a 100644 --- a/scripts/main.mk +++ b/scripts/main.mk @@ -83,6 +83,11 @@ GYP_FLAGS += -Dcxx_host=$(CXX_HOST) GYP_FLAGS += --depth=. GYP_FLAGS += -Goutput_dir=. GYP_FLAGS += --generator-output=./build/$(HOST_SLUG) +ifeq ($(ENABLE_COVERAGE),1) +GYP_FLAGS += -Denable_coverage=1 +else ifneq ($(ENABLE_COVERAGE),1) +GYP_FLAGS += -Denable_coverage=0 +endif .PHONY: Makefile/__project__ Makefile/__project__: print-env $(SUBMODULES) config/$(HOST_SLUG).gypi |