From ddb85811c16f0dab6d77269b183efa8d7a5a36df Mon Sep 17 00:00:00 2001 From: Thomas Zimmermann Date: Fri, 12 Aug 2016 13:25:29 +0200 Subject: Remove lcov-{reset,report,check} make targets and configuration This patch removes all support for the old implementation of test- coverage statistics. The related make targets will print and error message. Signed-off-by: Thomas Zimmermann --- Makefile.am | 10 +++++++++- configure.ac | 9 --------- m4/compiler.m4 | 14 -------------- tools/lcov.am | 43 ------------------------------------------- 4 files changed, 9 insertions(+), 67 deletions(-) delete mode 100644 tools/lcov.am diff --git a/Makefile.am b/Makefile.am index c116890..950c9c2 100644 --- a/Makefile.am +++ b/Makefile.am @@ -36,4 +36,12 @@ ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS} # Add rules for code-coverage testing, as defined by AX_CODE_COVERAGE @CODE_COVERAGE_RULES@ -include tools/lcov.am +# TODO: Remove these obsolete targets after some time. +lcov-reset: + $(error 'make lcov-reset' has been removed. Use 'make code-coverage-clean' instead.) + +lcov-report: + $(error 'make lcov-report' has been removed. Use 'make check-code-coverage' instead.) + +lcov-check: + $(error 'make lcov-check' has been removed. Use 'make check-code-coverage' instead.) diff --git a/configure.ac b/configure.ac index 2b2a38b..be49a23 100644 --- a/configure.ac +++ b/configure.ac @@ -71,7 +71,6 @@ AC_HEADER_STDC AC_C_INLINE AM_PROG_LIBTOOL AC_PROG_MKDIR_P -COMPILER_COVERAGE COMPILER_OPTIMISATIONS PKG_PROG_PKG_CONFIG @@ -341,11 +340,6 @@ if test x$enable_code_coverage = xyes; then AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing]) fi -if test x$enable_compiler_coverage = xyes; then - ## so that config.h changes when you toggle gcov support - AC_DEFINE_UNQUOTED(DBUS_GCOV_ENABLED, 1, [Defined if gcov is enabled to force a rebuild due to config.h changing]) -fi - #### Integer sizes AC_CHECK_SIZEOF(char) @@ -1948,9 +1942,6 @@ fi if test x$enable_code_coverage = xyes; then echo "NOTE: building with coverage profiling is definitely for developers only." fi -if test x$enable_compiler_coverage = xyes; then - echo "NOTE: building with coverage profiling is definitely for developers only." -fi if test x$enable_verbose_mode = xyes; then echo "NOTE: building with verbose mode increases library size, may slightly increase security risk, and decreases performance." fi diff --git a/m4/compiler.m4 b/m4/compiler.m4 index 5a197ad..b01d835 100644 --- a/m4/compiler.m4 +++ b/m4/compiler.m4 @@ -51,17 +51,3 @@ AC_DEFUN([COMPILER_OPTIMISATIONS], [CFLAGS=`echo "$CFLAGS" | sed -e "s/ -O[1-9]*\b/ -O0/g"`] fi])dnl ])# COMPILER_OPTIMISATIONS - -# COMPILER_COVERAGE -# ---------------------- -# Add configure option to enable coverage data. -AC_DEFUN([COMPILER_COVERAGE], -[AC_ARG_ENABLE(compiler-coverage, - AS_HELP_STRING([--enable-compiler-coverage], - [Enable generation of coverage data]), -[if test "x$enable_compiler_coverage" = "xyes"; then - if test "x$GCC" = "xyes"; then - CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" - fi -fi],[enable_compiler_coverage=no])dnl -])# COMPILER_COVERAGE diff --git a/tools/lcov.am b/tools/lcov.am deleted file mode 100644 index ac34867..0000000 --- a/tools/lcov.am +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright © 2008-2011 Collabora Ltd. -# Copyright © 2008-2011 Nokia Corporation -# -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: -# -# The above copyright notice and this permission notice shall be included -# in all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -lcov-reset: - lcov --directory @abs_top_builddir@ --zerocounters - -lcov-report: - lcov --directory @abs_top_builddir@ --capture \ - --output-file @abs_top_builddir@/lcov.info - $(mkdir_p) @abs_top_builddir@/lcov.html - git_commit=`GIT_DIR=@abs_top_srcdir@/.git git log -1 --pretty=format:%h 2>/dev/null`;\ - genhtml --title "@PACKAGE_STRING@ $$git_commit" \ - --output-directory @abs_top_builddir@/lcov.html lcov.info - @echo - @echo 'lcov report can be found in:' - @echo 'file://@abs_top_builddir@/lcov.html/index.html' - @echo - -lcov-check: - $(MAKE) lcov-reset - $(MAKE) check $(LCOV_CHECK_ARGS) - $(MAKE) lcov-report - -## vim:set ft=automake: -- 2.7.4