Skip to contentSkip to conversation

master - makefiles: check lcov file has content

PATCH Zdenek Kabelac 1 participant 1 message Apr 14, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw
Gitweb:        http://git.fedorahosted.org/git/?p=lvm2.git;a=commitdiff;h=4cdf155a87211d269ae31c70856f580111fca186
Commit:        4cdf155a87211d269ae31c70856f580111fca186
Parent:        a084b3122f5df4d9dcd244762132abcb5f46ea6a
Author:        Zdenek Kabelac <[email protected]>
AuthorDate:    Tue Apr 14 13:28:26 2015 +0200
Committer:     Zdenek Kabelac <[email protected]>
CommitterDate: Tue Apr 14 13:29:43 2015 +0200

makefiles: check lcov file has content

genhtml may get confused without content.

---
 Makefile.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile.in +1 -1
index 41eb2e9..a7bed8e 100644
@@ -155,7 +155,7 @@ lcov: $(LCOV_TRACES)
 	$(RM) -r $(LCOV_REPORTS_DIR)
 	$(MKDIR_P) $(LCOV_REPORTS_DIR)
 	for i in $(LCOV_TRACES); do \
-		test -s $$i && lc="$$lc $$i"; \
+		test -s $$i -a $$(wc -w <$$i) -ge 100 && lc="$$lc $$i"; \
 	done; \
 	test -z "$$lc" || $(GENHTML) -p @abs_top_builddir@ \
 		-o $(LCOV_REPORTS_DIR) $$lc