Skip to content

Commit

Permalink
build: use nyc's merge command
Browse files Browse the repository at this point in the history
a 'merge' command has recently been added to nyc, eliminating the need
for the istanbul-merge library.

PR-URL: #20760
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
  • Loading branch information
Benjamin Coe authored and MylesBorins committed May 22, 2018
1 parent 338e663 commit 3b51617
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ coverage: coverage-test ## Run the tests and generate a coverage report.
.PHONY: coverage-build
coverage-build: all
mkdir -p node_modules
if [ ! -d node_modules/istanbul-merge ]; then \
$(NODE) ./deps/npm install istanbul-merge --no-save --no-package-lock; fi
if [ ! -d node_modules/nyc ]; then \
$(NODE) ./deps/npm install nyc --no-save --no-package-lock; fi
if [ ! -d gcovr ]; then git clone -b 3.4 --depth=1 \
Expand Down Expand Up @@ -195,11 +193,11 @@ coverage-test: coverage-build
mv lib lib__
mv lib_ lib
mkdir -p coverage .cov_tmp
$(NODE) ./node_modules/.bin/istanbul-merge --out \
.cov_tmp/libcov.json 'out/Release/.coverage/coverage-*.json'
$(NODE) ./node_modules/.bin/nyc merge 'out/Release/.coverage' \
.cov_tmp/libcov.json
(cd lib && .$(NODE) ../node_modules/.bin/nyc report \
--temp-directory "$(CURDIR)/.cov_tmp" \
--report-dir "../coverage")
--report-dir "$(CURDIR)/coverage")
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
--gcov-exclude='.*usr' -v -r Release/obj.target \
--html --html-detail -o ../coverage/cxxcoverage.html \
Expand Down

0 comments on commit 3b51617

Please sign in to comment.