[gtksourceview] Use AX_VALGRIND_CHECK



commit a4f62825990c8bb76adec50c3f0870acf910a3d1
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Tue Aug 2 07:36:34 2016 +0200

    Use AX_VALGRIND_CHECK
    
    As explained in the GNOME Programming Guidelines:
    https://developer.gnome.org/programming-guidelines/stable/tooling.html.en
    
    Take suppression files from:
    https://github.com/dtrebbien/GNOME.supp
    as explained at:
    https://wiki.gnome.org/Valgrind
    
    Example:
    $ cd testsuite/
    $ make check-valgrind-memcheck
    But the tests fail, it seems that the suppression files are not
    up-to-date.

 Makefile.am           |    1 +
 configure.ac          |    5 +++++
 testsuite/Makefile.am |   11 +++++++++++
 3 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e846564..ed5571f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -44,6 +44,7 @@ MAINTAINERCLEANFILES =                \
        m4/ax_is_release.m4     \
        m4/ax_pkg_check_modules.m4 \
        m4/ax_require_defined.m4 \
+       m4/ax_valgrind_check.m4 \
        m4/codeset.m4           \
        m4/extern-inline.m4     \
        m4/fcntl-o.m4           \
diff --git a/configure.ac b/configure.ac
index 4ded99c..b0cbe33 100644
--- a/configure.ac
+++ b/configure.ac
@@ -192,6 +192,10 @@ GOBJECT_INTROSPECTION_CHECK([1.42.0])
 AX_REQUIRE_DEFINED([AX_CODE_COVERAGE])
 AX_CODE_COVERAGE()
 
+# Valgrind check
+AX_REQUIRE_DEFINED([AX_VALGRIND_CHECK])
+AX_VALGRIND_CHECK
+
 # Vala
 AX_REQUIRE_DEFINED([VAPIGEN_CHECK])
 VAPIGEN_CHECK
@@ -243,5 +247,6 @@ Configuration:
        GObject introspection:  ${found_introspection}
        Vala:                   ${enable_vala}
        Code coverage:          ${enable_code_coverage}
+       Valgrind check:         ${enable_valgrind}
        Installed tests:        ${enable_installed_tests}
 "
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
index f521814..bf94d5e 100644
--- a/testsuite/Makefile.am
+++ b/testsuite/Makefile.am
@@ -1,5 +1,16 @@
 @CODE_COVERAGE_RULES@
 
+@VALGRIND_CHECK_RULES@
+
+# https://github.com/dtrebbien/GNOME.supp
+VALGRIND_SUPPRESSIONS_FILES =                          \
+       $(top_srcdir)/../GNOME.supp/build/base.supp     \
+       $(top_srcdir)/../GNOME.supp/build/glib.supp     \
+       $(top_srcdir)/../GNOME.supp/build/gio.supp      \
+       $(top_srcdir)/../GNOME.supp/build/pango.supp    \
+       $(top_srcdir)/../GNOME.supp/build/gdk.supp      \
+       $(top_srcdir)/../GNOME.supp/build/gtk3.supp
+
 AM_CPPFLAGS =                          \
        -DG_LOG_DOMAIN=\"GtkSourceView\"\
        -I$(top_srcdir) -I$(srcdir)     \


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]