File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,7 @@ coverage-build: all
215
215
coverage-build-js :
216
216
mkdir -p node_modules
217
217
if [ ! -d node_modules/c8 ]; then \
218
- $(NODE ) ./deps/npm install c8@next --no-save --no-package-lock; \
218
+ $(NODE ) ./deps/npm install c8 --no-save --no-package-lock; \
219
219
fi
220
220
221
221
.PHONY : coverage-test
@@ -240,12 +240,17 @@ coverage-test: coverage-build
240
240
@grep -A3 Lines coverage/cxxcoverage.html | grep style \
241
241
| sed 's/<[^>]*>//g'| sed 's/ //g'
242
242
243
+ COV_REPORT_OPTIONS = --reporter=html \
244
+ --temp-directory=out/$(BUILDTYPE ) /.coverage --omit-relative=false \
245
+ --resolve=./lib --exclude="deps/" --exclude="test/" --exclude="tools/" \
246
+ --wrapper-length=0
247
+ ifdef COV_ENFORCE_THRESHOLD
248
+ COV_REPORT_OPTIONS += --check-coverage --lines=$(COV_ENFORCE_THRESHOLD )
249
+ endif
250
+
243
251
.PHONY : coverage-report-js
244
252
coverage-report-js :
245
- $(NODE ) ./node_modules/.bin/c8 report --reporter=html \
246
- --temp-directory=out/$(BUILDTYPE ) /.coverage --omit-relative=false \
247
- --resolve=./lib --exclude=" deps/" --exclude=" test/" --exclude=" tools/" \
248
- --wrapper-length=0
253
+ $(NODE ) ./node_modules/.bin/c8 report $(COV_REPORT_OPTIONS )
249
254
250
255
.PHONY : cctest
251
256
# Runs the C++ tests using the built `cctest` executable.
You can’t perform that action at this time.
0 commit comments