Fixes a crash when saving attachments fails
[modest] / tests / Makefile.am
index e973fc8..ac98936 100644 (file)
@@ -1,31 +1,76 @@
+#
+# Makefile.am
+#
+
+SUBDIRS = dbus_api
+
+# TODO: Why is this line here?
+MAINTAINERCLEANFILES    = Makefile.in
+
+TESTS_ENVIRONMENT       = top_builddir=$(top_builddir)  \
+                         CK_FORK=yes                   \
+                         CK_VERBOSITY=verbose
+
+TESTS                   =                           \
+                       check_text-utils            \
+                       check_modest-conf           \
+                       check_update-account        \
+                       check_modest-utils          \
+                       check_account-mgr           
+
+noinst_PROGRAMS=                                   \
+                       check_folder-xfer           \
+                       check_modest-conf           \
+                       check_text-utils            \
+                       check_modest-utils          \
+                       check_update-account        \
+                       check_account-mgr
+
 INCLUDES=\
+       @CHECK_CFLAGS@ \
        $(MODEST_GSTUFF_CFLAGS)\
+       $(MODEST_PLATFORM_CFLAGS)\
+       $(MODEST_TOOLKIT_CFLAGS)\
+       $(MODEST_PLUGIN_DEFINES)\
        $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_CFLAGS) \
        $(MODEST_LIBTINYMAIL_MAEMO_CFLAGS) \
-       -I$(MODEST_PLATFORM) \
+       -I${top_srcdir}/src/$(MODEST_TOOLKIT_DIR) \
        -I${top_srcdir}/src \
        -DPREFIX=\"@prefix@\" \
        -DMODESTLOCALEDIR=\""$(modestlocaledir)"\"
+objects=\
+       @CHECK_LIBS@ \
+       $(MODEST_GSTUFF_LIBS) \
+       $(MODEST_PLATFORM_LIBS) \
+       $(MODEST_TOOLKIT_LIBS) \
+        $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS) \
+        $(MODEST_LIBTINYMAIL_MAEMO_LIBS) \
+        ${top_srcdir}/src/$(MODEST_TOOLKIT_DIR)/libmodest-ui.la \
+        ${top_srcdir}/src/widgets/libmodest-widgets.la \
+        ${top_srcdir}/src/dbus_api/libmodest-dbus-api.la \
+       ${top_srcdir}/src/libmodest.la
 
-bin_PROGRAMS=\
-       folder-xfer
 
-folder_xfer_SOURCES=\
-       folder-transfer.c
+check_folder_xfer_SOURCES=\
+       check_folder-transfer.c
+check_folder_xfer_LDADD = $(objects)
 
-folder_xfer_LDADD = \
-       $(MODEST_GSTUFF_LIBS) \
-       $(MODEST_LIBTINYMAIL_GNOME_DESKTOP_LIBS) \
-       $(MODEST_LIBTINYMAIL_MAEMO_LIBS) \
-       ${top_srcdir}/src/$(MODEST_PLATFORM)/libmodest-ui.la \
-       ${top_srcdir}/src/widgets/libmodest-widgets.la \
-       ${top_srcdir}/src/modest-account-mgr.o \
-       ${top_srcdir}/src/modest-tny-platform-factory.o \
-       ${top_srcdir}/src/modest-conf.o \
-       ${top_srcdir}/src/modest-protocol-mgr.o \
-       ${top_srcdir}/src/modest-pair.o \
-       ${top_srcdir}/src/modest-marshal.o \
-       ${top_srcdir}/src/modest-tny-account-store.o \
-       ${top_srcdir}/src/modest-mail-operation.o \
-       ${top_srcdir}/src/modest-tny-msg-actions.o \
-       ${top_srcdir}/src/modest-text-utils.o
+check_update_account_SOURCES=\
+       check_update-account.c
+check_update_account_LDADD = $(objects)
+
+check_modest_conf_SOURCES=\
+       check_modest-conf.c
+check_modest_conf_LDADD = $(objects)
+
+check_modest_utils_SOURCES=\
+       check_modest-utils.c
+check_modest_utils_LDADD = $(objects)
+
+check_text_utils_SOURCES=\
+       check_text-utils.c
+check_text_utils_LDADD = $(objects)
+
+check_account_mgr_SOURCES=\
+       check_account-mgr.c
+check_account_mgr_LDADD = $(objects)