@@ -59,10 +59,10 @@ OSX_PACKAGING = $(OSX_DEPLOY_SCRIPT) $(OSX_FANCY_PLIST) $(OSX_INSTALLER_ICONS) \
5959 $(top_srcdir ) /contrib/macdeploy/detached-sig-apply.sh \
6060 $(top_srcdir ) /contrib/macdeploy/detached-sig-create.sh
6161
62- COVERAGE_INFO = baseline_filtered_combined.info baseline.info \
63- leveldb_baseline.info test_dash_filtered.info total_coverage.info \
62+ COVERAGE_INFO = baseline.info \
63+ test_dash_filtered.info total_coverage.info \
6464 baseline_filtered.info functional_test.info functional_test_filtered.info \
65- leveldb_baseline_filtered.info test_dash_coverage.info test_dash.info
65+ test_dash_coverage.info test_dash.info
6666
6767dist-hook :
6868 -$(GIT ) archive --format=tar HEAD -- src/clientversion.cpp | $(AMTAR ) -C $(top_distdir ) -xf -
@@ -166,52 +166,45 @@ $(BITCOIN_CLI_BIN): FORCE
166166 $(MAKE ) -C src $(@F )
167167
168168if USE_LCOV
169+ LCOV_FILTER_PATTERN =-p "/usr/include/" -p "src/leveldb/" -p "src/bench/" -p "src/univalue" -p "src/crypto/ctaes" -p "src/secp256k1"
169170
170171baseline.info :
171172 $(LCOV ) -c -i -d $(abs_builddir ) /src -o $@
172173
173174baseline_filtered.info : baseline.info
174- $(LCOV ) -r $< " /usr/include/*" -o $@
175+ $(abs_builddir ) /contrib/filter-lcov.py $(LCOV_FILTER_PATTERN ) $< $@
176+ $(LCOV ) -a $@ $(LCOV_OPTS ) -o $@
175177
176- leveldb_baseline.info : baseline_filtered.info
177- $(LCOV ) -c -i -d $(abs_builddir ) /src/leveldb -b $(abs_builddir ) /src/leveldb -o $@
178-
179- leveldb_baseline_filtered.info : leveldb_baseline.info
180- $(LCOV ) -r $< " /usr/include/*" -o $@
181-
182- baseline_filtered_combined.info : leveldb_baseline_filtered.info baseline_filtered.info
183- $(LCOV ) -a leveldb_baseline_filtered.info -a baseline_filtered.info -o $@
184-
185- test_dash.info : baseline_filtered_combined.info
178+ test_dash.info : baseline_filtered.info
186179 $(MAKE ) -C src/ check
187- $(LCOV ) -c -d $(abs_builddir ) /src -t test_dash -o $@
188- $(LCOV ) -z -d $(abs_builddir ) /src
189- $(LCOV ) -z -d $(abs_builddir ) /src/leveldb
180+ $(LCOV ) -c $(LCOV_OPTS ) -d $(abs_builddir ) /src -t test_dash -o $@
181+ $(LCOV ) -z $(LCOV_OPTS ) -d $(abs_builddir ) /src
190182
191183test_dash_filtered.info : test_dash.info
192- $(LCOV ) -r $< " /usr/include/*" -o $@
184+ $(abs_builddir ) /contrib/filter-lcov.py $(LCOV_FILTER_PATTERN ) $< $@
185+ $(LCOV ) -a $@ $(LCOV_OPTS ) -o $@
193186
194187functional_test.info : test_dash_filtered.info
195- -@TIMEOUT=15 python test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS )
196- $(LCOV ) -c -d $(abs_builddir ) /src --t functional-tests -o $@
197- $(LCOV ) -z -d $(abs_builddir ) /src
198- $(LCOV ) -z -d $(abs_builddir ) /src/leveldb
188+ -@TIMEOUT=15 test/functional/test_runner.py $(EXTENDED_FUNCTIONAL_TESTS )
189+ $(LCOV ) -c $(LCOV_OPTS ) -d $(abs_builddir ) /src --t functional-tests -o $@
190+ $(LCOV ) -z $(LCOV_OPTS ) -d $(abs_builddir ) /src
199191
200192functional_test_filtered.info : functional_test.info
201- $(LCOV ) -r $< " /usr/include/*" -o $@
193+ $(abs_builddir ) /contrib/filter-lcov.py $(LCOV_FILTER_PATTERN ) $< $@
194+ $(LCOV ) -a $@ $(LCOV_OPTS ) -o $@
202195
203- test_dash_coverage.info : baseline_filtered_combined .info test_dash_filtered.info
204- $(LCOV ) -a baseline_filtered.info -a leveldb_baseline_filtered .info -a test_dash_filtered.info -o $@
196+ test_dash_coverage.info : baseline_filtered .info test_dash_filtered.info
197+ $(LCOV ) -a $( LCOV_OPTS ) baseline_filtered .info -a test_dash_filtered.info -o $@
205198
206- total_coverage.info : baseline_filtered_combined.info test_dash_filtered.info functional_test_filtered.info
207- $(LCOV ) -a baseline_filtered.info -a leveldb_baseline_filtered .info -a test_dash_filtered.info -a functional_test_filtered.info -o $@ | $(GREP ) " \%" | $(AWK ) ' { print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
199+ total_coverage.info : test_dash_filtered.info functional_test_filtered.info
200+ $(LCOV ) -a $( LCOV_OPTS ) baseline_filtered .info -a test_dash_filtered.info -a functional_test_filtered.info -o $@ | $(GREP ) " \%" | $(AWK ) ' { print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
208201
209202test_dash.coverage/.dirstamp : test_dash_coverage.info
210- $(GENHTML ) -s $< -o $(@D )
203+ $(GENHTML ) -s $( LCOV_OPTS ) $ < -o $(@D )
211204 @touch $@
212205
213206total.coverage/.dirstamp : total_coverage.info
214- $(GENHTML ) -s $< -o $(@D )
207+ $(GENHTML ) -s $( LCOV_OPTS ) $ < -o $(@D )
215208 @touch $@
216209
217210cov : test_dash.coverage/.dirstamp total.coverage/.dirstamp
0 commit comments