aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-09-04 05:11:11 +0800
committerXan Lopez <xan@igalia.com>2012-09-04 19:23:13 +0800
commit18b87ec8068c5bf98aed9f507d43cba451dab665 (patch)
tree3df86b0f9c4b7b71bdaea9fd1cd93c1e0bdc30a8
parent0aff80b0d783422d0db25f59c434198205d4bed7 (diff)
downloadgsoc2013-epiphany-18b87ec8068c5bf98aed9f507d43cba451dab665.tar.gz
gsoc2013-epiphany-18b87ec8068c5bf98aed9f507d43cba451dab665.tar.zst
gsoc2013-epiphany-18b87ec8068c5bf98aed9f507d43cba451dab665.zip
Add code coverage support
Needs a fairly recent gnome-common. To use do: - Run configure with --enable-code-coverage - Type 'make check-code-coverage' - Open the HTML results https://bugzilla.gnome.org/show_bug.cgi?id=683297
-rw-r--r--Makefile.am2
-rw-r--r--configure.ac19
-rw-r--r--doc/reference/Makefile.am2
-rw-r--r--embed/Makefile.am1
-rw-r--r--lib/Makefile.am5
-rw-r--r--lib/egg/Makefile.am1
-rw-r--r--lib/history/Makefile.am1
-rw-r--r--lib/widgets/Makefile.am1
-rw-r--r--src/Makefile.am2
-rw-r--r--src/bookmarks/Makefile.am1
-rw-r--r--tests/Makefile.am2
11 files changed, 28 insertions, 9 deletions
diff --git a/Makefile.am b/Makefile.am
index 575f4eacd..72045304f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -20,6 +20,8 @@ DISTCHECK_CONFIGURE_FLAGS = \
--enable-debug \
--enable-gtk-doc
+@GNOME_CODE_COVERAGE_RULES@
+
# Ignore gtk theme cache files on distcheck
distuninstallcheck_listfiles = find . -type f -print | grep -v 'icon-theme.cache'
diff --git a/configure.ac b/configure.ac
index 10946e853..b547181aa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,8 @@ GNOME_DEBUG_CHECK
GNOME_COMPILE_WARNINGS([maximum])
GNOME_MAINTAINER_MODE_DEFINES
+GNOME_CODE_COVERAGE
+
MORE_WARN_FLAGS="-Wdeclaration-after-statement"
DEPRECATION_FLAGS=
@@ -302,13 +304,14 @@ AC_OUTPUT
echo "
Epiphany was configured with the following options:
- Source code location : $srcdir
- Compiler : $CC
- Prefix : $prefix
- Extra debugging support : $enable_debug
-
- GObject introspection : $found_introspection
- NSS support : $enable_nss
+ Source code location : $srcdir
+ Compiler : $CC
+ Prefix : $prefix
+ Extra debugging support : $enable_debug
Build tests : $enable_tests
- WebKit2 : $with_webkit2
+ Code coverage : $enable_code_coverage
+
+ GObject introspection : $found_introspection
+ NSS support : $enable_nss
+ WebKit2 : $with_webkit2
"
diff --git a/doc/reference/Makefile.am b/doc/reference/Makefile.am
index 605d14211..72cf06c5c 100644
--- a/doc/reference/Makefile.am
+++ b/doc/reference/Makefile.am
@@ -107,6 +107,7 @@ GTKDOC_CFLAGS = -DEPIPHANY_COMPILATION \
-I$(top_srcdir)/lib/history \
$(DEPENDENCIES_CFLAGS) \
$(DBUS_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(INCINTL)
GTKDOC_LIBS = \
@@ -119,6 +120,7 @@ GTKDOC_LIBS = \
$(top_builddir)/lib/egg/libegg.la \
$(DEPENDENCIES_LIBS) \
$(DBUS_LIBS) \
+ $(CODE_COVERAGE_LDFLAGS) \
$(LIBINTL)
# If you need to override some of the declarations, place them in the
diff --git a/embed/Makefile.am b/embed/Makefile.am
index 610a710fc..900bbd0f1 100644
--- a/embed/Makefile.am
+++ b/embed/Makefile.am
@@ -77,6 +77,7 @@ endif
libephyembed_la_CFLAGS = \
-DSHARE_DIR=\"$(pkgdatadir)\" \
$(DEPENDENCIES_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(AM_CFLAGS)
CLEANFILES = $(stamp_files) $(BUILT_SOURCES)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index 7c9401db5..8d0dca21e 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -95,9 +95,12 @@ libephymisc_la_CPPFLAGS = \
libephymisc_la_CFLAGS = \
$(DEPENDENCIES_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(AM_CFLAGS)
-libephymisc_la_LIBADD = -lm
+libephymisc_la_LIBADD = \
+ -lm \
+ $(CODE_COVERAGE_LDFLAGS)
bin_PROGRAMS = ephy-profile-migrator
diff --git a/lib/egg/Makefile.am b/lib/egg/Makefile.am
index 5415230a5..33c6548ba 100644
--- a/lib/egg/Makefile.am
+++ b/lib/egg/Makefile.am
@@ -26,5 +26,6 @@ libegg_la_CPPFLAGS = \
libegg_la_CFLAGS = \
$(DEPENDENCIES_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(AM_CFLAGS)
diff --git a/lib/history/Makefile.am b/lib/history/Makefile.am
index 06654fac2..ed134f2ce 100644
--- a/lib/history/Makefile.am
+++ b/lib/history/Makefile.am
@@ -22,6 +22,7 @@ libephyhistory_la_CPPFLAGS = \
libephyhistory_la_CFLAGS = \
$(DEPENDENCIES_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(AM_CFLAGS)
TYPES_H_FILES = ephy-history-types.h
diff --git a/lib/widgets/Makefile.am b/lib/widgets/Makefile.am
index bc53ec89d..3259bb703 100644
--- a/lib/widgets/Makefile.am
+++ b/lib/widgets/Makefile.am
@@ -126,4 +126,5 @@ libephywidgets_la_CPPFLAGS = \
libephywidgets_la_CFLAGS = \
$(DEPENDENCIES_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(AM_CFLAGS)
diff --git a/src/Makefile.am b/src/Makefile.am
index 0a01e931f..ada8e4716 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -108,6 +108,7 @@ endif
libephymain_la_CFLAGS = \
$(DEPENDENCIES_CFLAGS) \
$(WEBKIT_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(AM_CFLAGS)
UI_FILES = \
@@ -168,6 +169,7 @@ epiphany_LDADD = \
$(top_builddir)/lib/libephymisc.la \
$(top_builddir)/lib/egg/libegg.la \
$(DEPENDENCIES_LIBS) \
+ $(CODE_COVERAGE_LDFLAGS) \
$(LIBINTL)
if !WITH_WEBKIT2
diff --git a/src/bookmarks/Makefile.am b/src/bookmarks/Makefile.am
index eafa82026..5b42f0d63 100644
--- a/src/bookmarks/Makefile.am
+++ b/src/bookmarks/Makefile.am
@@ -111,6 +111,7 @@ libephybookmarks_la_CPPFLAGS = \
libephybookmarks_la_CFLAGS = \
$(DEPENDENCIES_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(AM_CFLAGS)
libephybookmarks_la_LIBADD =
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5c49dac0b..b480cdc98 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -100,6 +100,7 @@ INCLUDES = \
CFLAGS = \
$(DEPENDENCIES_CFLAGS) \
+ $(CODE_COVERAGE_CFLAGS) \
$(AM_CFLAGS)
LDADD = \
@@ -111,6 +112,7 @@ LDADD = \
$(top_builddir)/lib/libephymisc.la \
$(top_builddir)/lib/egg/libegg.la \
$(DBUS_LIBS) \
+ $(CODE_COVERAGE_LDFLAGS) \
$(DEPENDENCIES_LIBS)
test_ephy_download_SOURCES = \