[gcr] Don't use the GNOME coverage macros
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcr] Don't use the GNOME coverage macros
- Date: Fri, 19 Apr 2013 15:20:00 +0000 (UTC)
commit aa45e1f25343249e6e493db8be5e6852c45d1558
Author: Stef Walter <stefw gnome org>
Date: Fri Apr 19 16:34:25 2013 +0200
Don't use the GNOME coverage macros
We don't use lcov anyway, and it's acting up with newer versions.
Makefile.decl | 9 ---------
configure.ac | 26 ++++++++++++++++++++++----
2 files changed, 22 insertions(+), 13 deletions(-)
---
diff --git a/Makefile.decl b/Makefile.decl
index 61a00ec..999e209 100644
--- a/Makefile.decl
+++ b/Makefile.decl
@@ -15,15 +15,6 @@ perform-memcheck: $(TEST_PROGS)
$(builddir)/$$test $(TEST_ARGS) || exit 3; \
done
- GNOME_CODE_COVERAGE_RULES@
-
-CODE_COVERAGE_DIRECTORY = $(builddir)
-CODE_COVERAGE_OUTPUT_FILE = $(top_builddir)/build/coverage.info
-CODE_COVERAGE_OUTPUT_DIRECTORY = $(top_builddir)/build/coverage
-
-coverage: code-coverage
-clear-coverage: code-coverage-clean
-
V_ASN1 = $(V_ASN1_$(V))
V_ASN1_ = $(V_ASN1_$(AM_DEFAULT_VERBOSITY))
V_ASN1_0 = @echo " ASN1 " $@;
diff --git a/configure.ac b/configure.ac
index 3b2fac7..3db7b52 100644
--- a/configure.ac
+++ b/configure.ac
@@ -293,9 +293,27 @@ AC_MSG_RESULT($strict_status)
AC_SUBST(INTROSPECTION_FLAGS)
AC_SUBST(TEST_MODE)
-GNOME_CODE_COVERAGE
-CFLAGS="$CFLAGS $CODE_COVERAGE_CFLAGS"
-LDFLAGS="$LDFLAGS $CODE_COVERAGE_LDFLAGS"
+AC_MSG_RESULT([$enable_coverage])
+
+AC_MSG_CHECKING([code coverage])
+
+if test "$enable_coverage" = "yes"; then
+ if test "$GCC" != "yes"; then
+ AC_MSG_ERROR(Coverage testing requires GCC)
+ fi
+
+ AC_PATH_PROG(GCOV, gcov, no)
+ if test "$GCOV" = "no" ; then
+ AC_MSG_ERROR(gcov tool is not available)
+ fi
+
+ CFLAGS="$CFLAGS -O0 -g --coverage"
+ LDFLAGS="$LDFLAGS --coverage"
+fi
+
+AM_CONDITIONAL([WITH_COVERAGE], [test "$enable_coverage" = "yes"])
+
+AC_MSG_RESULT($enable_coverage)
AC_ARG_ENABLE(valgrind,
AC_HELP_STRING([--enable-valgrind],
@@ -400,5 +418,5 @@ echo " Strict Compilation: $strict_status"
echo " GTK+ Widgets: $with_gtk"
echo " Introspection: $found_introspection"
echo " Valgrind: $valgrind_status"
-echo " Test Coverage: ${enable_code_coverage:-no}"
+echo " Test Coverage: ${enable_coverage:-no}"
echo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]