Add "check" framework support. Fixes bug #505622 (Guillaume Desmottes).
[empathy.git] / tests / Makefile.am
index 1635859..29ed270 100644 (file)
@@ -1,3 +1,9 @@
+CLEANFILES=
+
+include $(top_srcdir)/rules/check.mak
+
+SUPPRESSIONS=valgrind.supp dlopen.supp
+
 AM_CPPFLAGS =                                          \
        -I$(top_srcdir)                                 \
        $(EMPATHY_CFLAGS)                               \
@@ -8,8 +14,29 @@ LDADD =                                                               \
        $(top_builddir)/libempathy/libempathy.la                \
        $(EMPATHY_LIBS)
 
-noinst_PROGRAMS =                      \
+bin_PROGRAMS =                 \
        contact-manager
 
 contact_manager_SOURCES = contact-manager.c
 
+if HAVE_CHECK
+check_PROGRAMS = check-main
+TESTS = check-main
+check_main_SOURCES =                             \
+    check-main.c                                 \
+    check-helpers.c                              \
+    check-helpers.h                              \
+    check-libempathy.h                           \
+    check-empathy-utils.c
+
+check_main_LDADD = \
+    @CHECK_LIBS@ \
+    $(top_builddir)/libempathy-gtk/libempathy-gtk.la   \
+    $(top_builddir)/libempathy/libempathy.la           \
+    $(AM_LDFLAGS)
+
+check_main_CFLAGS = \
+    @CHECK_CFLAGS@ \
+    $(AM_CFLAGS)
+
+endif