build: use intermediate lcov coverage file

Otherwise the 'lcov -q --remove' run fails with the following error:
lcov: ERROR: cannot write to coverage.info!

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
pull/174/head
Andreas Cadhalpun 9 years ago
parent bb7522ce67
commit 14bf59c1d5
  1. 2
      Makefile
  2. 5
      tests/Makefile

@ -177,7 +177,7 @@ clean::
$(RM) $(CLEANSUFFIXES) $(RM) $(CLEANSUFFIXES)
$(RM) $(CLEANSUFFIXES:%=tools/%) $(RM) $(CLEANSUFFIXES:%=tools/%)
$(RM) -r coverage-html $(RM) -r coverage-html
$(RM) -rf coverage.info lcov $(RM) -rf coverage.info coverage.info.in lcov
distclean:: distclean::
$(RM) $(DISTCLEANSUFFIXES) $(RM) $(DISTCLEANSUFFIXES)

@ -217,8 +217,9 @@ fate-list:
coverage.info: TAG = LCOV coverage.info: TAG = LCOV
coverage.info: coverage.info:
$(M)lcov -q -d $(CURDIR) -b $(patsubst src%,./,$(SRC_LINK)) --capture | \ $(M)lcov -q -d $(CURDIR) -b $(patsubst src%,./,$(SRC_LINK)) --capture | \
sed "s,$(CURDIR)/\./,$(CURDIR)/," > $@ sed "s,$(CURDIR)/\./,$(CURDIR)/," > $@.in
$(M)lcov -q --remove $@ "/usr*" -o $@ $(M)lcov -q --remove $@.in "/usr*" > $@
$(Q)$(RM) $@.in
lcov: TAG = GENHTML lcov: TAG = GENHTML
lcov: coverage.info lcov: coverage.info

Loading…
Cancel
Save