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 <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
  • Loading branch information
Benjamin Coe authored and BridgeAR committed May 18, 2018
1 parent 2c42999 commit d5a117c
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 d5a117c

Please sign in to comment.