add a way to configure code coverage
authorWilfried Goesgens <dothebart@citadel.org>
Mon, 8 Nov 2010 20:40:53 +0000 (21:40 +0100)
committerWilfried Goesgens <dothebart@citadel.org>
Mon, 8 Nov 2010 20:40:53 +0000 (21:40 +0100)
citadel/debian/rules

index 6779c8f512e592f4acd54e0959b1cb67ed3d1ded..b9e067b2ff5b424c5f6e73190ee9437579ae76ff 100755 (executable)
@@ -16,7 +16,7 @@ CFLAGS = -Wall -g
 
 EXTRA_ARGS=
 PROFILE_ARGS=
-#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling threadoff rss"
+#to enable debugging: export DEB_BUILD_OPTIONS="debug profiling threadoff rss gcov"
 ifneq (,$(findstring profiling,$(DEB_BUILD_OPTIONS)))
        PROFILE_ARGS= --with-gprof
 endif
@@ -45,6 +45,11 @@ ifneq (,$(findstring iodbg,$(DEB_BUILD_OPTIONS)))
        CFLAGS += -D BIGBAD_IODBG
 endif
 
+ifneq (,$(findstring gcov,$(DEB_BUILD_OPTIONS)))
+       CFLAGS += -fprofile-arcs -ftest-coverage
+       LDFLAGS += -fprofile-arcs -ftest-coverage
+endif
+
 configure: configure-stamp
 configure-stamp:
        dh_testdir