Use EDS_INSTALLED_TESTS macros to install tests
[platform/upstream/evolution-data-server.git] / tests / libedata-book / Makefile.am
1
2 noinst_LTLIBRARIES = libdata-test-utils.la
3
4 libdata_test_utils_la_SOURCES = \
5         data-test-utils.c \
6         data-test-utils.h \
7         $(NULL)
8
9 libdata_test_utils_la_CPPFLAGS = \
10         $(AM_CPPFLAGS) \
11         -I$(top_srcdir) \
12         -I$(top_builddir) \
13         -I$(top_srcdir)/addressbook \
14         -I$(top_builddir)/addressbook \
15         -I$(top_srcdir)/calendar \
16         -I$(top_builddir)/calendar \
17         -I$(top_srcdir)/tests/libedataserver \
18         -I$(top_builddir)/tests/libedataserver \
19         -I$(top_srcdir)/tests/test-server-utils \
20         -I$(top_builddir)/tests/test-server-utils \
21         -I$(top_srcdir)/private \
22         -I$(top_builddir)/private \
23         -DBACKENDDIR=\"$(ebook_backenddir)\" \
24         -DDATADIR=\"$(datadir)\" \
25         -DSRCDIR=\""$(abs_srcdir)"\" \
26         -DBUILDDIR=\""$(abs_topbuilddir)"\" \
27         $(EVOLUTION_ADDRESSBOOK_CFLAGS) \
28         $(EVOLUTION_CALENDAR_CFLAGS) \
29         $(GIO_UNIX_CFLAGS) \
30         $(CAMEL_CFLAGS) \
31         $(NULL)
32
33 libdata_test_utils_la_LIBADD = \
34         $(top_builddir)/addressbook/libebook-contacts/libebook-contacts-1.2.la \
35         $(top_builddir)/addressbook/libedata-book/libedata-book-1.2.la \
36         $(top_builddir)/addressbook/libebook/libebook-1.2.la \
37         $(top_builddir)/tests/test-server-utils/libetestserverutils.la \
38         $(top_builddir)/private/libedbus-private.la \
39         $(EVOLUTION_ADDRESSBOOK_LIBS) \
40         $(EVOLUTION_CALENDAR_LIBS) \
41         $(GIO_UNIX_LIBS) \
42         $(CAMEL_LIBS) \
43         $(NULL)
44
45 # Should be kept ordered approximately from least to most difficult/complex
46 #
47 # Note that these tests must be run in order:
48 #   test-sqlite-cursor-posix-initial,
49 #   test-sqlite-cursor-en-US-migrated,
50 #   test-sqlite-cursor-posix-migrated
51 #
52 # This is because each migrated test changes the
53 # locale and reloads the same addressbook of the previous test. 
54 TESTS = \
55         test-sqlite-get-contact \
56         test-sqlite-create-cursor \
57         test-sqlite-cursor-move-by-posix \
58         test-sqlite-cursor-move-by-en-US \
59         test-sqlite-cursor-move-by-fr-CA \
60         test-sqlite-cursor-move-by-de-DE \
61         test-sqlite-cursor-set-target \
62         test-sqlite-cursor-calculate \
63         test-sqlite-cursor-set-sexp \
64         test-sqlite-cursor-change-locale
65
66 noinst_PROGRAMS = $(TESTS)
67
68 TEST_CPPFLAGS = \
69         $(libdata_test_utils_la_CPPFLAGS) \
70         $(EVOLUTION_ADDRESSBOOK_CPPFLAGS) \
71         $(NULL)
72
73 TEST_LIBS = \
74         $(libdata_test_utils_la_LIBADD) \
75         libdata-test-utils.la \
76         $(top_builddir)/addressbook/libebook/libebook-1.2.la \
77         $(EVOLUTION_ADDRESSBOOK_LIBS) \
78         $(NULL)
79
80 test_sqlite_get_contact_LDADD=$(TEST_LIBS)
81 test_sqlite_get_contact_CPPFLAGS=$(TEST_CPPFLAGS)
82 test_sqlite_create_cursor_LDADD=$(TEST_LIBS)
83 test_sqlite_create_cursor_CPPFLAGS=$(TEST_CPPFLAGS)
84 test_sqlite_cursor_move_by_posix_LDADD=$(TEST_LIBS)
85 test_sqlite_cursor_move_by_posix_CPPFLAGS=$(TEST_CPPFLAGS)
86 test_sqlite_cursor_move_by_en_US_LDADD=$(TEST_LIBS)
87 test_sqlite_cursor_move_by_en_US_CPPFLAGS=$(TEST_CPPFLAGS)
88 test_sqlite_cursor_move_by_fr_CA_LDADD=$(TEST_LIBS)
89 test_sqlite_cursor_move_by_fr_CA_CPPFLAGS=$(TEST_CPPFLAGS)
90 test_sqlite_cursor_move_by_de_DE_LDADD=$(TEST_LIBS)
91 test_sqlite_cursor_move_by_de_DE_CPPFLAGS=$(TEST_CPPFLAGS)
92 test_sqlite_cursor_set_target_LDADD=$(TEST_LIBS)
93 test_sqlite_cursor_set_target_CPPFLAGS=$(TEST_CPPFLAGS)
94 test_sqlite_cursor_calculate_LDADD=$(TEST_LIBS)
95 test_sqlite_cursor_calculate_CPPFLAGS=$(TEST_CPPFLAGS)
96 test_sqlite_cursor_set_sexp_LDADD=$(TEST_LIBS)
97 test_sqlite_cursor_set_sexp_CPPFLAGS=$(TEST_CPPFLAGS)
98 test_sqlite_cursor_change_locale_LDADD=$(TEST_LIBS)
99 test_sqlite_cursor_change_locale_CPPFLAGS=$(TEST_CPPFLAGS)
100
101 #####################################
102 #     Optionally Install Tests      #
103 #####################################
104 @EDS_INSTALLED_TESTS_RULE@
105 INSTALLED_TESTS = $(TESTS)
106 INSTALLED_TESTS_TYPE = session-exclusive
107 INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"
108
109 -include $(top_srcdir)/git.mk