[evolution-data-server] Use EDS_INSTALLED_TESTS macros to install tests



commit 178cc9f247a00f8333099ce60569d63e00d5cc7b
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Mon Dec 2 18:03:55 2013 +0900

    Use EDS_INSTALLED_TESTS macros to install tests
    
    This commit adds the usage of EDS_INSTALLED_TESTS and a few lines
    to all the test directories which can run installed.

 configure.ac                        |    4 +++
 tests/cursor-example/Makefile.am    |    3 +-
 tests/libebook-contacts/Makefile.am |    8 ++++++
 tests/libebook/Makefile.am          |    8 ++++++
 tests/libebook/client/Makefile.am   |   42 +++++++++++++++++++++++++++++++++++
 tests/libecal/Makefile.am           |    8 ++++++
 tests/libecal/client/Makefile.am    |    9 +++++++
 tests/libedata-book/Makefile.am     |    8 ++++++
 tests/libedataserver/Makefile.am    |    8 ++++++
 tests/test-server-utils/Makefile.am |   12 ++++++++++
 10 files changed, 109 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1d81c5d..2d4caa6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -322,6 +322,9 @@ dnl This relies on $SED, which is defined in ltmain.sh, which
 dnl is invoked by LT_INIT (at least I think that's how it works).
 GNOME_CODE_COVERAGE
 
+dnl Add the option install unit tests
+EDS_INSTALLED_TESTS
+
 dnl ******************************
 dnl Gtk Doc stuff
 dnl ******************************
@@ -1857,4 +1860,5 @@ echo "
        Examples:               $enable_examples
        Code coverage (gcov):   $enable_code_coverage
        Strict building:        $enable_strict
+       Installed tests:        $enable_installed_tests
 "
diff --git a/tests/cursor-example/Makefile.am b/tests/cursor-example/Makefile.am
index e0b003a..f73a163 100644
--- a/tests/cursor-example/Makefile.am
+++ b/tests/cursor-example/Makefile.am
@@ -42,7 +42,8 @@ cursor_example_CPPFLAGS = \
 cursor_example_CFLAGS =
 cursor_example_LDFLAGS = \
        $(top_builddir)/addressbook/libebook/libebook-1.2.la \
-       $(top_builddir)/tests/test-server-utils/libetestserverutils.la \
+       $(top_builddir)/addressbook/libebook-contacts/libebook-contacts-1.2.la \
+       $(top_builddir)/libedataserver/libedataserver-1.2.la \
        $(top_builddir)/private/libedbus-private.la \
        $(EVOLUTION_ADDRESSBOOK_LIBS) \
        $(EXAMPLES_LIBS) $(CAMEL_LIBS) \
diff --git a/tests/libebook-contacts/Makefile.am b/tests/libebook-contacts/Makefile.am
index 7ab0a4b..465ecf5 100644
--- a/tests/libebook-contacts/Makefile.am
+++ b/tests/libebook-contacts/Makefile.am
@@ -47,3 +47,11 @@ test_phone_number_CPPFLAGS=$(TEST_CPPFLAGS)
 noinst_PROGRAMS = $(TESTS)
 
 -include $(top_srcdir)/git.mk
+
+#####################################
+#     Optionally Install Tests      #
+#####################################
+ EDS_INSTALLED_TESTS_RULE@
+INSTALLED_TESTS = $(TESTS)
+INSTALLED_TESTS_TYPE = session-exclusive
+INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"
diff --git a/tests/libebook/Makefile.am b/tests/libebook/Makefile.am
index 890b069..a526048 100644
--- a/tests/libebook/Makefile.am
+++ b/tests/libebook/Makefile.am
@@ -127,3 +127,11 @@ test_ebook_remove_contacts_LDADD=$(TEST_LIBS)
 test_ebook_remove_contacts_CPPFLAGS=$(TEST_CPPFLAGS)
 
 -include $(top_srcdir)/git.mk
+
+#####################################
+#     Optionally Install Tests      #
+#####################################
+ EDS_INSTALLED_TESTS_RULE@
+INSTALLED_TESTS = $(TESTS)
+INSTALLED_TESTS_TYPE = session-exclusive
+INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"
diff --git a/tests/libebook/client/Makefile.am b/tests/libebook/client/Makefile.am
index 5af456d..3dc8b4f 100644
--- a/tests/libebook/client/Makefile.am
+++ b/tests/libebook/client/Makefile.am
@@ -128,3 +128,45 @@ test_client_cursor_operations_LDADD=$(TEST_LIBS)
 test_client_cursor_operations_CPPFLAGS=$(TEST_CPPFLAGS)
 
 -include $(top_srcdir)/git.mk
+
+#####################################
+#     Optionally Install Tests      #
+#####################################
+ EDS_INSTALLED_TESTS_RULE@
+
+# Here we list all the $(TESTS) except
+# for test-client-cursor-operations, that
+# test requires that we set the locale
+# on the system bus, or set EDS_TESTING=1
+# both in the test environment AND the D-Bus
+# session environment.
+#
+# test-client-self also fails for some reason
+# when running installed, not sure why.
+INSTALLED_TESTS = \
+       test-client-refresh \
+       test-client-add-contact \
+       test-client-get-contact \
+       test-client-get-contact-uids \
+       test-client-modify-contact \
+       test-client-remove-contact \
+       test-client-remove-contact-by-uid \
+       test-client-remove-contacts \
+       test-client-add-and-get-sync \
+       test-client-add-and-get-async \
+       test-client-preserve-uid \
+       test-client-photo-is-uri \
+       test-client-e164-param \
+        test-client-custom-summary \
+       test-client-get-revision \
+       test-client-write-write \
+       test-client-get-view \
+       test-client-uid-only-view \
+       test-client-revision-view \
+       test-client-view-operations \
+       test-client-suppress-notifications \
+       test-client-cursor-create \
+       $(NULL)
+
+INSTALLED_TESTS_TYPE = session-exclusive
+INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"
diff --git a/tests/libecal/Makefile.am b/tests/libecal/Makefile.am
index 4e78c94..be31a6c 100644
--- a/tests/libecal/Makefile.am
+++ b/tests/libecal/Makefile.am
@@ -112,3 +112,11 @@ test_ecal_set_default_timezone_LDADD=$(TEST_ECAL_LIBS)
 test_ecal_set_default_timezone_CPPFLAGS=$(TEST_ECAL_CPPFLAGS)
 
 -include $(top_srcdir)/git.mk
+
+#####################################
+#     Optionally Install Tests      #
+#####################################
+ EDS_INSTALLED_TESTS_RULE@
+INSTALLED_TESTS = $(TESTS)
+INSTALLED_TESTS_TYPE = session-exclusive
+INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"
diff --git a/tests/libecal/client/Makefile.am b/tests/libecal/client/Makefile.am
index abe8090..379a706 100644
--- a/tests/libecal/client/Makefile.am
+++ b/tests/libecal/client/Makefile.am
@@ -17,6 +17,7 @@ TEST_CPPFLAGS= \
 TEST_LIBS = \
        $(top_builddir)/calendar/libecal/libecal-1.2.la \
        $(top_builddir)/tests/test-server-utils/libetestserverutils.la \
+       $(top_builddir)/libedataserver/libedataserver-1.2.la \
        $(EVOLUTION_CALENDAR_LIBS) \
        $(CAMEL_LIBS) \
        $(NULL)
@@ -79,3 +80,11 @@ test_client_send_objects_LDADD=$(TEST_LIBS)
 test_client_send_objects_CPPFLAGS=$(TEST_CPPFLAGS)
 
 -include $(top_srcdir)/git.mk
+
+#####################################
+#     Optionally Install Tests      #
+#####################################
+ EDS_INSTALLED_TESTS_RULE@
+INSTALLED_TESTS = $(TESTS)
+INSTALLED_TESTS_TYPE = session-exclusive
+INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"
diff --git a/tests/libedata-book/Makefile.am b/tests/libedata-book/Makefile.am
index 346b081..5bc4972 100644
--- a/tests/libedata-book/Makefile.am
+++ b/tests/libedata-book/Makefile.am
@@ -98,4 +98,12 @@ test_sqlite_cursor_set_sexp_CPPFLAGS=$(TEST_CPPFLAGS)
 test_sqlite_cursor_change_locale_LDADD=$(TEST_LIBS)
 test_sqlite_cursor_change_locale_CPPFLAGS=$(TEST_CPPFLAGS)
 
+#####################################
+#     Optionally Install Tests      #
+#####################################
+ EDS_INSTALLED_TESTS_RULE@
+INSTALLED_TESTS = $(TESTS)
+INSTALLED_TESTS_TYPE = session-exclusive
+INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"
+
 -include $(top_srcdir)/git.mk
diff --git a/tests/libedataserver/Makefile.am b/tests/libedataserver/Makefile.am
index 07922fb..3595c8e 100644
--- a/tests/libedataserver/Makefile.am
+++ b/tests/libedataserver/Makefile.am
@@ -67,3 +67,11 @@ e_user_prompter_test_LDADD = $(test_LDADD) $(GTK_LIBS)
 endif
 
 -include $(top_srcdir)/git.mk
+
+#####################################
+#     Optionally Install Tests      #
+#####################################
+ EDS_INSTALLED_TESTS_RULE@
+INSTALLED_TESTS = $(TESTS)
+INSTALLED_TESTS_TYPE = session-exclusive
+INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"
diff --git a/tests/test-server-utils/Makefile.am b/tests/test-server-utils/Makefile.am
index 202f62c..efa4d9d 100644
--- a/tests/test-server-utils/Makefile.am
+++ b/tests/test-server-utils/Makefile.am
@@ -37,7 +37,11 @@ common_libs = \
 ######################################
 #         Utility Library            #
 ######################################
+if EDS_INSTALLED_TESTS_ENABLED
+lib_LTLIBRARIES = libetestserverutils.la
+else
 noinst_LTLIBRARIES = libetestserverutils.la
+endif
 
 libetestserverutils_la_CPPFLAGS = $(common_cflags)
 libetestserverutils_la_LIBADD = $(common_libs)
@@ -67,3 +71,11 @@ clean-local-check:
        -rm -rf $(abs_top_builddir)/tests/test-server-utils/cache
 
 -include $(top_srcdir)/git.mk
+
+#####################################
+#     Optionally Install Tests      #
+#####################################
+ EDS_INSTALLED_TESTS_RULE@
+INSTALLED_TESTS = $(TESTS)
+INSTALLED_TESTS_TYPE = session-exclusive
+INSTALLED_TESTS_ENVIRONMENT = "TEST_INSTALLED_SERVICES=1"


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