From 44d80c5620b73b3fdc9165f3377c6c1fa81e9c31 Mon Sep 17 00:00:00 2001 From: killagu Date: Fri, 23 Feb 2018 21:06:08 +0800 Subject: [PATCH] build: fix coverage after gcovr update PR-URL: https://github.com/nodejs/node/pull/18958 Fixes: https://github.com/nodejs/node/issues/18938 Ref: https://github.com/nodejs/build/pull/1145 Reviewed-By: Michael Dawson Reviewed-By: Daijiro Wachi --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 605b4c5d3fadec..84f2f3fb28af66 100644 --- a/Makefile +++ b/Makefile @@ -176,8 +176,8 @@ coverage-build: all --single-branch git://github.com/gcovr/gcovr.git; fi if [ ! -d build ]; then git clone --depth=1 \ --single-branch https://github.com/nodejs/build.git; fi - if [ ! -f gcovr/scripts/gcovr.orig ]; then \ - (cd gcovr && patch -N -p1 < \ + if [ ! -f gcovr/gcovr/gcov.py.orig ]; then \ + (cd gcovr && patch -b -N -p1 < \ "$(CURDIR)/build/jenkins/scripts/coverage/gcovr-patches.diff"); fi if [ -d lib_ ]; then $(RM) -r lib; mv lib_ lib; fi mv lib lib_ @@ -203,7 +203,7 @@ coverage-test: coverage-build (cd lib && .$(NODE) ../node_modules/.bin/nyc report \ --temp-directory "$(CURDIR)/.cov_tmp" \ --report-dir "../coverage") - -(cd out && "../gcovr/scripts/gcovr" --gcov-exclude='.*deps' \ + -(cd out && PYTHONPATH=$(CURDIR)/gcovr $(PYTHON) -m gcovr --gcov-exclude='.*deps' \ --gcov-exclude='.*usr' -v -r Release/obj.target \ --html --html-detail -o ../coverage/cxxcoverage.html \ --gcov-executable="$(GCOV)")