summaryrefslogtreecommitdiffstats
path: root/coverage.mk
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:41:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 05:41:20 +0000
commit2cd20b3e73d0162e3fa23ebcee8e89a3b967ca6f (patch)
tree754a142de5cd8f987abe255e8a15b5ef94109da4 /coverage.mk
parentInitial commit. (diff)
downloadlibcmis-2cd20b3e73d0162e3fa23ebcee8e89a3b967ca6f.tar.xz
libcmis-2cd20b3e73d0162e3fa23ebcee8e89a3b967ca6f.zip
Adding upstream version 0.6.2.upstream/0.6.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--coverage.mk22
1 files changed, 22 insertions, 0 deletions
diff --git a/coverage.mk b/coverage.mk
new file mode 100644
index 0000000..01cbadd
--- /dev/null
+++ b/coverage.mk
@@ -0,0 +1,22 @@
+.PHONY: coverage genlcov coverage-clean
+
+coverage:
+ -$(MAKE) $(AM_MAKEFLAGS) -k check
+ $(MAKE) $(AM_MAKEFLAGS) genlcov
+
+infos = libcmis-lcov.info libcmis-c-lcov.info
+$(infos): %-lcov.info:
+ $(LCOV) --directory $(top_builddir)/src/$* \
+ --base-directory $(top_builddir)/src/$* \
+ --capture \
+ --output-file $@ \
+ --no-external \
+ --compat-libtool
+genlcov: $(infos)
+ LANG=C $(GENHTML) --output-directory libcmis-lcov --title "Libcmis Code Coverage" --legend --show-details $^
+ @echo "file://$(abs_top_builddir)/libcmis-lcov/index.html"
+
+coverage-clean:
+ -$(LCOV) --directory $(top_builddir) -z
+ -rm -rf $(infos) libcmis-lcov
+ -find $(top_builddir) -type f -name "*.gcda" -o -name "*.gcno" -o -name "*.gcov" -exec rm "{}" \;