Skip to content

Commit a553015

Browse files
mhdawsonMylesBorins
authored andcommitted
build: fix coverage generation
Changes in command line options for nyc resulted in the coverage target no longer working. Pin the major version of nyc and update the options to get it working again. PR-URL: #23769 Fixes: #23690 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: George Adams <[email protected]>
1 parent f8bd7c0 commit a553015

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ coverage: coverage-test ## Run the tests and generate a coverage report.
203203
coverage-build: all
204204
mkdir -p node_modules
205205
if [ ! -d node_modules/nyc ]; then \
206-
$(NODE) ./deps/npm install nyc --no-save --no-package-lock; fi
206+
$(NODE) ./deps/npm install nyc@13 --no-save --no-package-lock; fi
207207
if [ ! -d gcovr ]; then git clone -b 3.4 --depth=1 \
208208
--single-branch git://github.com/gcovr/gcovr.git; fi
209209
if [ ! -d build ]; then git clone --depth=1 \
@@ -234,8 +234,9 @@ coverage-test: coverage-build
234234
$(NODE) ./node_modules/.bin/nyc merge 'out/Release/.coverage' \
235235
.cov_tmp/libcov.json
236236
(cd lib && .$(NODE) ../node_modules/.bin/nyc report \
237-
--temp-directory "$(CURDIR)/.cov_tmp" \
238-
--report-dir "$(CURDIR)/coverage")
237+
--temp-dir "$(CURDIR)/.cov_tmp" \
238+
--report-dir "$(CURDIR)/coverage" \
239+
--reporter html)
239240
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
240241
--gcov-exclude='.*usr' -v -r Release/obj.target \
241242
--html --html-detail -o ../coverage/cxxcoverage.html \

0 commit comments

Comments
 (0)