One less thing in TESTS_ENVIRONMENT.
Bug: https://bugzilla.gnome.org/show_bug.cgi?id=690830
Reviewed-by: Philip Withnall <philip@tecnocode.co.uk>
BACKEND_DIR='$(libdir)/folks/$(FOLKS_MODULE_VERSION)/backends'
AC_SUBST([BACKEND_DIR])
-BACKEND_KF='$(top_builddir)/backends/key-file/.libs/key-file.so'
-AC_SUBST([BACKEND_KF])
-BACKEND_TP='$(top_builddir)/backends/telepathy/.libs/telepathy.so'
-AC_SUBST([BACKEND_TP])
-
-AS_IF([test x$have_libsocialweb_backend = xyes], [
- BACKEND_LIBSOCIALWEB='$(top_builddir)/backends/libsocialweb/.libs/libsocialweb.so'
- AC_SUBST([BACKEND_LIBSOCIALWEB])
-])
-
-AS_IF([test x$enable_tracker_backend = xyes], [
- BACKEND_TRACKER='$(top_builddir)/backends/tracker/.libs/tracker.so'
- AC_SUBST([BACKEND_TRACKER])
-])
-
-AS_IF([test x$enable_eds_backend = xyes], [
- BACKEND_EDS='$(top_builddir)/backends/eds/.libs/eds.so'
- AC_SUBST([BACKEND_EDS])
-])
-
-if test x$enable_ofono_backend = xyes; then
- BACKEND_OFONO='$(top_builddir)/backends/ofono/.libs/ofono.so'
- AC_SUBST([BACKEND_OFONO])
-fi
-
-# All of the backend libraries in our tree; to be used by the tests
-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"
-])
-AS_IF([test x$enable_tracker_backend = xyes], [
- TRACKER_BACKEND_UNINST_PATH='$(BACKEND_TRACKER)'
- BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$TRACKER_BACKEND_UNINST_PATH"
-])
-AS_IF([test x$enable_eds_backend = xyes], [
- EDS_BACKEND_UNINST_PATH='$(BACKEND_EDS)'
- BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$EDS_BACKEND_UNINST_PATH"
-])
-AS_IF([test x$enable_ofono_backend = xyes], [
- OFONO_BACKEND_UNINST_PATH='$(BACKEND_OFONO)'
- BACKEND_UNINST_PATH="$BACKEND_UNINST_PATH:$OFONO_BACKEND_UNINST_PATH"
-])
-AC_SUBST([BACKEND_UNINST_PATH])
-
# -----------------------------------------------------------
# Tools
# -----------------------------------------------------------
[CCode (cname = "HAVE_LIBSOCIALWEB")]
public static bool HAVE_LIBSOCIALWEB;
+ [CCode (cname = "HAVE_OFONO")]
+ public static bool HAVE_OFONO;
+
+ [CCode (cname = "HAVE_TELEPATHY")]
+ public static bool HAVE_TELEPATHY;
+
[CCode (cname = "HAVE_TRACKER")]
public static bool HAVE_TRACKER;
RUN_WITH_PRIVATE_BUS = $(top_srcdir)/tests/tools/with-session-bus-eds.sh
TESTS_ENVIRONMENT = \
- FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
$(RUN_WITH_PRIVATE_BUS) \
--session \
--
$(NULL)
TESTS_ENVIRONMENT = \
- FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
$(top_srcdir)/tests/tools/execute-test.sh \
$(NULL)
individual-retrieval \
$(NULL)
-TESTS_ENVIRONMENT = \
- FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
- $(NULL)
-
TESTS = $(noinst_PROGRAMS)
individual_retrieval_SOURCES = \
$(AM_CPPFLAGS) \
-I$(top_srcdir) \
-I$(top_srcdir)/folks \
+ -include $(CONFIG_HEADER) \
-DABS_TOP_SRCDIR=\"${abs_top_srcdir}\" \
-DABS_TOP_BUILDDIR=\"${abs_top_builddir}\" \
-DPKGLIBEXECDIR=\"${pkglibexecdir}\" \
this._transient_dir = this.create_transient_dir ();
this.private_bus_up ();
+ if (Environment.get_variable ("FOLKS_TESTS_INSTALLED") == null)
+ {
+ string[] locations = {
+ Folks.BuildConf.ABS_TOP_BUILDDIR + "/backends/key-file/.libs/key-file.so",
+ };
+
+ if (Folks.BuildConf.HAVE_EDS)
+ locations += Folks.BuildConf.ABS_TOP_BUILDDIR + "/backends/eds/.libs/eds.so";
+
+ if (Folks.BuildConf.HAVE_LIBSOCIALWEB)
+ locations += Folks.BuildConf.ABS_TOP_BUILDDIR + "/backends/libsocialweb/.libs/libsocialweb.so";
+
+ if (Folks.BuildConf.HAVE_OFONO)
+ locations += Folks.BuildConf.ABS_TOP_BUILDDIR + "/backends/ofono/.libs/ofono.so";
+
+ if (Folks.BuildConf.HAVE_TELEPATHY)
+ locations += Folks.BuildConf.ABS_TOP_BUILDDIR + "/backends/telepathy/.libs/telepathy.so";
+
+ if (Folks.BuildConf.HAVE_TRACKER)
+ locations += Folks.BuildConf.ABS_TOP_BUILDDIR + "/backends/tracker/.libs/tracker.so";
+
+ Environment.set_variable ("FOLKS_BACKEND_PATH",
+ string.joinv (":", locations), true);
+ }
+
/* By default, no backend is allowed. Subclasses must override. */
Environment.set_variable ("FOLKS_BACKENDS_ALLOWED", "", true);
}
$(NULL)
TESTS_ENVIRONMENT = \
- FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
$(top_srcdir)/tests/tools/execute-test.sh \
$(NULL)
$(NULL)
TESTS_ENVIRONMENT = \
- FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
FOLKS_BACKEND_KEY_FILE_PATH=$(srcdir)/data/relationships-empty.ini \
$(top_srcdir)/tests/tools/execute-test.sh \
$(NULL)
avatar_file=@abs_top_srcdir@/tests/data/avatar-01.jpg
TESTS_ENVIRONMENT = \
- FOLKS_BACKEND_PATH=$(BACKEND_UNINST_PATH) \
$(RUN_WITH_PRIVATE_BUS) \
--session \
--