summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorcypherpunks <cypherpunks@torproject.org>2015-03-05 15:48:47 +0100
committerNick Mathewson <nickm@torproject.org>2015-03-14 13:00:05 -0400
commit918ce27c31bedfb5554f1653b6dd6bbf346ca4a3 (patch)
treebd6300bc8199cbd564dfcbc36dc962aa3795f179 /Makefile.am
parent45db963de4037a80b5993877886c0da60645180b (diff)
downloadtor-918ce27c31bedfb5554f1653b6dd6bbf346ca4a3.tar.gz
tor-918ce27c31bedfb5554f1653b6dd6bbf346ca4a3.zip
Warn users trying to generate a coverage report when not configured as such.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am4
1 files changed, 4 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 0650d86853..56a1a01c44 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,6 +86,7 @@ reset-gcov:
HTML_COVER_DIR=$(top_builddir)/coverage_html
coverage-html: all
+if COVERAGE_ENABLED
test -e "`which lcov`" || (echo "lcov must be installed. See <http://ltp.sourceforge.net/coverage/lcov.php>." && false)
test -d "$(HTML_COVER_DIR)" || $(MKDIR_P) "$(HTML_COVER_DIR)"
lcov --rc lcov_branch_coverage=1 --directory $(top_builddir)/src --zerocounters
@@ -94,6 +95,9 @@ coverage-html: all
lcov --capture --rc lcov_branch_coverage=1 --no-external --directory $(top_builddir) --base-directory $(top_srcdir) --output-file "$(HTML_COVER_DIR)/lcov.tmp"
lcov --remove "$(HTML_COVER_DIR)/lcov.tmp" --rc lcov_branch_coverage=1 'test/*' 'ext/tinytest*' '/usr/*' --output-file "$(HTML_COVER_DIR)/lcov.info"
genhtml --branch-coverage -o "$(HTML_COVER_DIR)" "$(HTML_COVER_DIR)/lcov.info"
+else
+ @printf "Not configured with --enable-coverage, run ./configure --enable-coverage\n"
+endif
# Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c,
# eventdns.[hc], tinytest*.[ch]