Use EDS_INSTALLED_TESTS macros to install tests
[platform/upstream/evolution-data-server.git] / tests / test-server-utils / Makefile.am
1 NULL =
2
3 SUBDIRS = services
4
5 @GNOME_CODE_COVERAGE_RULES@
6
7 common_cflags = \
8         $(AM_CPPFLAGS) \
9         -I$(top_srcdir) \
10         -I$(top_builddir) \
11         -I$(top_srcdir)/addressbook \
12         -I$(top_builddir)/addressbook \
13         -I$(top_srcdir)/calendar \
14         -I$(top_builddir)/calendar \
15         -DG_LOG_DOMAIN=\"e-test-server-utils\" \
16         -DEDS_TEST_DBUS_SERVICE_DIR=\""$(abs_top_builddir)/tests/test-server-utils/services"\" \
17         -DEDS_TEST_WORK_DIR=\""$(abs_top_builddir)/tests/test-server-utils/cache"\" \
18         -DEDS_TEST_SCHEMA_DIR=\""$(abs_top_builddir)/data"\" \
19         -DEDS_TEST_ADDRESS_BOOK_DIR=\""$(abs_top_builddir)/addressbook/backends/file/.libs"\" \
20         -DEDS_TEST_CALENDAR_DIR=\""$(abs_top_builddir)/calendar/backends/file/.libs"\" \
21         -DEDS_TEST_REGISTRY_DIR=\""$(abs_top_builddir)/modules/cache-reaper/.libs"\" \
22         -DEDS_TEST_CAMEL_DIR=\""$(abs_top_builddir)/camel/providers/local/.libs"\" \
23         $(E_DATA_SERVER_CFLAGS) \
24         $(EVOLUTION_CALENDAR_CFLAGS) \
25         $(GIO_UNIX_CFLAGS) \
26         $(NULL)
27
28 common_libs = \
29         $(top_builddir)/libedataserver/libedataserver-1.2.la \
30         $(top_builddir)/addressbook/libebook/libebook-1.2.la \
31         $(top_builddir)/calendar/libecal/libecal-1.2.la \
32         $(E_DATA_SERVER_LIBS) \
33         $(EVOLUTION_CALENDAR_LIBS) \
34         $(GIO_UNIX_LIBS) \
35         $(NULL)
36
37 ######################################
38 #         Utility Library            #
39 ######################################
40 if EDS_INSTALLED_TESTS_ENABLED
41 lib_LTLIBRARIES = libetestserverutils.la
42 else
43 noinst_LTLIBRARIES = libetestserverutils.la
44 endif
45
46 libetestserverutils_la_CPPFLAGS = $(common_cflags)
47 libetestserverutils_la_LIBADD = $(common_libs)
48 libetestserverutils_la_SOURCES = \
49         e-test-server-utils.c \
50         e-test-server-utils.h \
51         $(NULL)
52
53 ######################################
54 #         Local Unit Tests           #
55 ######################################
56 noinst_PROGRAMS = $(TESTS)
57
58 TESTS = test-fixture
59
60 test_fixture_CPPFLAGS = $(common_cflags)
61 test_fixture_LDADD    = $(common_libs) libetestserverutils.la
62 test_fixture_SOURCES  = test-fixture.c
63
64 ######################################
65 # The test directory needs to be     #
66 # cleaned in order to pass distcheck #
67 ######################################
68 clean-local: clean-local-check
69 .PHONY: clean-local-check
70 clean-local-check:
71         -rm -rf $(abs_top_builddir)/tests/test-server-utils/cache
72
73 -include $(top_srcdir)/git.mk
74
75 #####################################
76 #     Optionally Install Tests      #
77 #####################################
78 @EDS_INSTALLED_TESTS_RULE@
79 INSTALLED_TESTS = $(TESTS)
80 INSTALLED_TESTS_TYPE = session-exclusive
81 INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"