Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: fix coverage generation #23769

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ coverage: coverage-test ## Run the tests and generate a coverage report.
coverage-build: all
mkdir -p node_modules
if [ ! -d node_modules/nyc ]; then \
$(NODE) ./deps/npm install nyc --no-save --no-package-lock; fi
$(NODE) ./deps/npm install nyc@13 --no-save --no-package-lock; fi
if [ ! -d gcovr ]; then git clone -b 3.4 --depth=1 \
--single-branch git://github.com/gcovr/gcovr.git; fi
if [ ! -d build ]; then git clone --depth=1 \
Expand Down Expand Up @@ -234,8 +234,9 @@ coverage-test: coverage-build
$(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 "$(CURDIR)/coverage")
--temp-dir "$(CURDIR)/.cov_tmp" \
--report-dir "$(CURDIR)/coverage" \
--reporter html)
-(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