testing: do not require telepathy
authorPatrick Ohly <patrick.ohly@intel.com>
Mon, 25 Mar 2013 13:30:48 +0000 (14:30 +0100)
committerPatrick Ohly <patrick.ohly@intel.com>
Tue, 26 Mar 2013 08:49:21 +0000 (09:49 +0100)
Previously, all testing was disabled when the Telepathy backend was
disabled. That is too strict. For example, the EDS backend tests can
work without it.

Only the core folks tests and of course the Telepathy tests depend on
the Telepathy backend and thus must be disabled when that backend is
disabled.

Adding the TP backend path to the FOLKS_BACKEND_PATH env variable
must be conditional, otherwise there are errors about not finding that
.so file when running the other tests.

configure.ac
tests/Makefile.am

index d35e0f1..fa2ca06 100644 (file)
@@ -370,7 +370,10 @@ if test x$enable_ofono_backend = xyes; then
 fi
 
 # All of the backend libraries in our tree; to be used by the tests
-BACKEND_UNINST_PATH='$(BACKEND_KF):$(BACKEND_TP)'
+BACKEND_UNINST_PATH='$(BACKEND_KF)'
+AS_IF([test "x$enable_telepathy_backend" = "xyes"], [
+  BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$(BACKEND_TP)"
+])
 AS_IF([test x$have_libsocialweb_backend = xyes], [
   LIBSOCIALWEB_BACKEND_UNINST_PATH='$(BACKEND_LIBSOCIALWEB)'
   BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$LIBSOCIALWEB_BACKEND_UNINST_PATH"
@@ -438,8 +441,6 @@ AM_CONDITIONAL([ENABLE_INSPECT_TOOL], [test "$with_inspect_tool" = "yes"])
 AC_ARG_ENABLE([tests],
               AS_HELP_STRING([--enable-tests],[Enable building of tests]),
               [enable_tests=$enableval], [enable_tests=yes])
-AS_IF([test "$enable_tests" = "yes" -a "$enable_telepathy_backend" = "no"],
-      [AC_MSG_ERROR([The Telepathy backend must be enabled to build tests])])
 AM_CONDITIONAL([ENABLE_TESTS], [test x$enable_tests = xyes])
 
 # -----------------------------------------------------------
index dc7f7be..10c0f56 100644 (file)
@@ -5,11 +5,10 @@ SUBDIRS = \
        lib \
        key-file \
        tools \
-       folks \
        $(NULL)
 
 if ENABLE_TELEPATHY
-SUBDIRS += telepathy
+SUBDIRS += folks telepathy
 endif
 
 if ENABLE_LIBSOCIALWEB