Skip to content

Commit d7722cb

Browse files
mhdawsonMayaLekova
authored andcommitted
build: fix gocvr version used for coverage
Fix the gcovr version to a fixed version and uses patches specific to that version. This avoids us being broken by changes in the gcovr repo. Using file name for patches specific to the version level will allow us to move up when necessary without breaking coverage for earlier versions of Node.js PR-URL: nodejs#19094 Reviewed-By: Gibson Fahnestock <[email protected]>
1 parent 221c89f commit d7722cb

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ coverage-build: all
172172
$(NODE) ./deps/npm install istanbul-merge --no-save --no-package-lock; fi
173173
if [ ! -d node_modules/nyc ]; then \
174174
$(NODE) ./deps/npm install nyc --no-save --no-package-lock; fi
175-
if [ ! -d gcovr ]; then git clone --depth=1 \
175+
if [ ! -d gcovr ]; then git clone -b 3.4 --depth=1 \
176176
--single-branch git://github.com/gcovr/gcovr.git; fi
177177
if [ ! -d build ]; then git clone --depth=1 \
178178
--single-branch https://github.com/nodejs/build.git; fi
179-
if [ ! -f gcovr/gcovr/gcov.py.orig ]; then \
180-
(cd gcovr && patch -b -N -p1 < \
181-
"$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches.diff"); fi
179+
if [ ! -f gcovr/scripts/gcovr.orig ]; then \
180+
(cd gcovr && patch -N -p1 < \
181+
"$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches-3.4.diff"); fi
182182
if [ -d lib_ ]; then $(RM) -r lib; mv lib_ lib; fi
183183
mv lib lib_
184184
$(NODE) ./node_modules/.bin/nyc instrument --extension .js --extension .mjs lib_/ lib/
@@ -203,7 +203,7 @@ coverage-test: coverage-build
203203
(cd lib && .$(NODE) ../node_modules/.bin/nyc report \
204204
--temp-directory "$(CURDIR)/.cov_tmp" \
205205
--report-dir "../coverage")
206-
-(cd out && PYTHONPATH=$(CURDIR)/gcovr $(PYTHON) -m gcovr --gcov-exclude='.*deps' \
206+
-(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \
207207
--gcov-exclude='.*usr' -v -r Release/obj.target \
208208
--html --html-detail -o ../coverage/cxxcoverage.html \
209209
--gcov-executable="$(GCOV)")

0 commit comments

Comments
 (0)