Skip to content

Commit 88e09ac

Browse files
committed
tests: Fix LCOV_OPTS to be in the correct position
`lcov`'s `-a` option takes an argument. With `LCOV_OPTS` immediately after `-a`, the first additional argument becomes the argument to `-a` which is incorrect. Also add `LCOV_OPTS` to more `lcov` calls.
1 parent e789b30 commit 88e09ac

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile.am

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ $(COV_TOOL_WRAPPER):
189189
@chmod +x $(COV_TOOL_WRAPPER)
190190

191191
baseline.info: $(COV_TOOL_WRAPPER)
192-
$(LCOV) -c -i -d $(abs_builddir)/src -o $@
192+
$(LCOV) $(LCOV_OPTS) -c -i -d $(abs_builddir)/src -o $@
193193

194194
baseline_filtered.info: baseline.info
195195
$(abs_builddir)/contrib/filter-lcov.py $(LCOV_FILTER_PATTERN) $< $@
@@ -223,13 +223,13 @@ functional_test_filtered.info: functional_test.info
223223
$(LCOV) -a $@ $(LCOV_OPTS) -o $@
224224

225225
fuzz_coverage.info: fuzz_filtered.info
226-
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a fuzz_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
226+
$(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a fuzz_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
227227

228228
test_bitcoin_coverage.info: baseline_filtered.info test_bitcoin_filtered.info
229-
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -o $@
229+
$(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a test_bitcoin_filtered.info -o $@
230230

231231
total_coverage.info: test_bitcoin_filtered.info functional_test_filtered.info
232-
$(LCOV) -a $(LCOV_OPTS) baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
232+
$(LCOV) $(LCOV_OPTS) -a baseline_filtered.info -a test_bitcoin_filtered.info -a functional_test_filtered.info -o $@ | $(GREP) "\%" | $(AWK) '{ print substr($$3,2,50) "/" $$5 }' > coverage_percent.txt
233233

234234
fuzz.coverage/.dirstamp: fuzz_coverage.info
235235
$(GENHTML) -s $(LCOV_OPTS) $< -o $(@D)

0 commit comments

Comments
 (0)