diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 6eceb761f4..b1f92f5b34 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,6 +1,6 @@ # Copyright (c) 2001-2004, Roger Dingledine # Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson -# Copyright (c) 2007-2011, The Tor Project, Inc. +# Copyright (c) 2007-2015, The Tor Project, Inc. # See LICENSE for licensing information # "foreign" means we don't follow GNU package layout standards @@ -19,11 +19,11 @@ noinst_PROGRAMS= DISTCLEANFILES= bin_SCRIPTS= AM_CPPFLAGS= +AM_CFLAGS = @TOR_SYSTEMD_CFLAGS@ include src/include.am include doc/include.am include contrib/include.am - EXTRA_DIST+= \ ChangeLog \ INSTALL \ @@ -71,8 +71,28 @@ test: all test-network: all ./src/test/test-network.sh +test-stem: $(TESTING_TOR_BINARY) + @if test -d "$$STEM_SOURCE_DIR"; then \ + $(PYTHON) "$$STEM_SOURCE_DIR"/run_tests.py --tor $(TESTING_TOR_BINARY) --all --log notice --target RUN_ALL; \ + else \ + echo '$$STEM_SOURCE_DIR was not set.'; echo; \ + echo "To run these tests, git clone https://git.torproject.org/stem.git/ ; export STEM_SOURCE_DIR=\`pwd\`/stem"; \ + fi + + reset-gcov: - rm -f src/*/*.gcda + rm -f src/*/*.gcda src/*/*/*.gcda + +HTML_COVER_DIR=./coverage_html +coverage-html: all + 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 ./src --zerocounters + $(MAKE) reset-gcov + $(MAKE) check + lcov --capture --rc lcov_branch_coverage=1 --no-external --directory . --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" # Avoid strlcpy.c, strlcat.c, aes.c, OpenBSD_malloc_Linux.c, sha256.c, # eventdns.[hc], tinytest*.[ch] @@ -99,4 +119,4 @@ version: fi mostlyclean-local: - rm -f src/*/*.gc{da,no} + rm -f src/*/*.gc{da,no} src/*/*/*.gc{da,no} |