Skip to content
Browse files

build: improve `make coverage`

Run cleanup for all relevant subdirectories, and exclude generated
source files (e.g. `out/Release/...`) from coverage reporting.
Also enable running `make cctest` again (It’s unclear to me why this
was disabled, as it does reduce coverage unnecessarily).

PR-URL: #29487
Reviewed-By: Rich Trott <>
Reviewed-By: Colin Ihrig <>
Reviewed-By: Benjamin Gruenbaum <>
Reviewed-By: Jiawen Geng <>
  • Loading branch information...
addaleax authored and Trott committed Sep 7, 2019
1 parent f615285 commit f2e35ff691298537beb72c10a2d39be8e77cc2fd
Showing with 5 additions and 7 deletions.
  1. +5 −7 Makefile
@@ -240,17 +240,15 @@ coverage-build-js:

.PHONY: coverage-test
coverage-test: coverage-build
$(RM) out/$(BUILDTYPE)/*.gcda
$(RM) out/$(BUILDTYPE)/*.gcda
$(RM) out/$(BUILDTYPE)/*.gcda
$(RM) out/$(BUILDTYPE)/*.gcda
$(RM) out/$(BUILDTYPE)/*/*.gcda
$(RM) out/$(BUILDTYPE)/*.gcda
$(RM) out/$(BUILDTYPE)/*.gcda
$(RM) out/$(BUILDTYPE)/*/*.gcda
-NODE_V8_COVERAGE=out/$(BUILDTYPE)/.coverage \
TEST_CI_ARGS="$(TEST_CI_ARGS) --type=coverage" $(MAKE) $(COVTESTS)
$(MAKE) coverage-report-js
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
--gcov-exclude='.*usr' -v -r Release/ \
-(cd out && "../gcovr/scripts/gcovr" \
--gcov-exclude='.*\b(deps|usr|out|cctest)\b' -v -r Release/ \
--html --html-detail -o ../coverage/cxxcoverage.html \
@echo -n "Javascript coverage %: "
@@ -335,7 +333,7 @@ test-cov: all
$(MAKE) build-addons
$(MAKE) build-js-native-api-tests
$(MAKE) build-node-api-tests
# $(MAKE) cctest
$(MAKE) cctest

test-parallel: all

0 comments on commit f2e35ff

Please sign in to comment.
You can’t perform that action at this time.