[evolution-data-server/gnome-3-30] I#30 - Some of the tests fail to run with disabled RPATH
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-30] I#30 - Some of the tests fail to run with disabled RPATH
- Date: Tue, 18 Sep 2018 20:18:48 +0000 (UTC)
commit 8da228dd1be875db7fe553452ba76a24fc23a121
Author: Milan Crha <mcrha redhat com>
Date: Tue Sep 18 22:14:45 2018 +0200
I#30 - Some of the tests fail to run with disabled RPATH
Closes https://gitlab.gnome.org/GNOME/evolution-data-server/issues/30
CMakeLists.txt | 3 +++
cmake/modules/FindPhonenumber.cmake | 8 ++++++--
.../backends/google/tests/CMakeLists.txt | 1 -
src/addressbook/libebook-contacts/CMakeLists.txt | 1 +
src/addressbook/libebook/CMakeLists.txt | 1 +
tests/libedata-book/data-test-utils.c | 11 ++++++++---
tests/libedata-book/test-book-cache-create-cursor.c | 3 ++-
.../test-book-cache-cursor-calculate.c | 3 ++-
.../test-book-cache-cursor-change-locale.c | 3 ++-
.../test-book-cache-cursor-move-by-de-DE.c | 3 ++-
.../test-book-cache-cursor-move-by-en-US.c | 3 ++-
.../test-book-cache-cursor-move-by-fr-CA.c | 3 ++-
.../test-book-cache-cursor-move-by-posix.c | 3 ++-
.../libedata-book/test-book-cache-cursor-set-sexp.c | 3 ++-
.../test-book-cache-cursor-set-target.c | 3 ++-
tests/libedata-book/test-book-cache-get-contact.c | 3 ++-
tests/libedata-book/test-book-cache-offline.c | 3 ++-
tests/libedata-book/test-book-cache-utils.c | 11 ++++++++---
tests/libedata-book/test-sqlite-create-cursor.c | 3 ++-
tests/libedata-book/test-sqlite-cursor-calculate.c | 3 ++-
.../test-sqlite-cursor-change-locale.c | 3 ++-
.../test-sqlite-cursor-move-by-de-DE.c | 3 ++-
.../test-sqlite-cursor-move-by-en-US.c | 3 ++-
.../test-sqlite-cursor-move-by-fr-CA.c | 3 ++-
.../test-sqlite-cursor-move-by-posix.c | 3 ++-
tests/libedata-book/test-sqlite-cursor-set-sexp.c | 3 ++-
tests/libedata-book/test-sqlite-cursor-set-target.c | 3 ++-
tests/libedata-book/test-sqlite-get-contact.c | 3 ++-
tests/libedata-cal/CMakeLists.txt | 1 +
tests/libedata-cal/test-cal-cache-getters.c | 3 ++-
tests/libedata-cal/test-cal-cache-intervals.c | 3 ++-
tests/libedata-cal/test-cal-cache-offline.c | 3 ++-
tests/libedata-cal/test-cal-cache-search.c | 3 ++-
tests/libedata-cal/test-cal-cache-utils.c | 11 ++++++++---
tests/test-server-utils/e-test-server-utils.c | 21 +++++++++++----------
35 files changed, 97 insertions(+), 47 deletions(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a82b018e4..c5da31555 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -926,6 +926,9 @@ set(E_DATA_SERVER_LDFLAGS ${E_DATA_SERVER_LDFLAGS} ${MANUAL_NSPR_LIBS} ${MANUAL_
pkg_check_modules(BACKEND REQUIRED gio-2.0 gmodule-2.0 libsecret-1 libsoup-2.4 libxml-2.0)
pkg_check_modules(ADDRESSBOOK REQUIRED gio-2.0 libxml-2.0 libsoup-2.4 libsecret-1)
pkg_check_modules(CALENDAR REQUIRED gio-2.0 libical>=${libical_minimum_version} libsoup-2.4 libxml-2.0
libsecret-1)
+set(ADDRESSBOOK_CFLAGS ${ADDRESSBOOK_CFLAGS} ${PHONENUMBER_DEFINITIONS})
+set(ADDRESSBOOK_INCLUDE_DIRS ${ADDRESSBOOK_INCLUDE_DIRS} ${PHONENUMBER_INCLUDE_DIRS})
+set(ADDRESSBOOK_LDFLAGS ${ADDRESSBOOK_LDFLAGS} ${PHONENUMBER_LDFLAGS})
set(CALENDAR_CFLAGS ${CALENDAR_CFLAGS} ${LIBICAL_EXTRA_CFLAGS})
pkg_check_modules(CAMEL REQUIRED gio-2.0 gmodule-2.0 ${mozilla_nss} ${mozilla_nspr}
sqlite3>=${sqlite_minimum_version})
diff --git a/cmake/modules/FindPhonenumber.cmake b/cmake/modules/FindPhonenumber.cmake
index 4e006882d..04d105685 100644
--- a/cmake/modules/FindPhonenumber.cmake
+++ b/cmake/modules/FindPhonenumber.cmake
@@ -8,6 +8,7 @@
# PHONENUMBER_RAW_INPUT_NEEDED - Whether Parse() or ParseAndKeepRawInput() must be used to get the
country-code source
# PHONENUMBER_DEFINITIONS - definitions to use with target_compile_definitions() and similar commands
# PHONENUMBER_INCLUDE_DIRS - include directories to use with target_include_directories() and similar
commands
+# PHONENUMBER_LIB_DIRS - directory where libphonenumber can be found
# PHONENUMBER_LDFLAGS - LDFLAGS to use with target_link_libraries() and similar commands
include(PrintableOptions)
@@ -21,6 +22,7 @@ endif(NOT WITH_PHONENUMBER)
set(PHONENUMBER_DEFINITIONS -DI18N_PHONENUMBERS_USE_BOOST)
set(PHONENUMBER_INCLUDE_DIRS)
+set(PHONENUMBER_LIB_DIRS)
set(PHONENUMBER_LDFLAGS -lphonenumber)
string(LENGTH "${CMAKE_BINARY_DIR}" bindirlen)
@@ -35,10 +37,12 @@ string(TOUPPER "${WITH_PHONENUMBER}" optupper)
if(("${optupper}" STREQUAL "ON") OR ("${substr}" STREQUAL "${CMAKE_BINARY_DIR}"))
set(WITH_PHONENUMBER "ON")
set(PHONENUMBER_INCLUDE_DIRS "${INCLUDE_INSTALL_DIR}")
- set(PHONENUMBER_LDFLAGS -L${LIB_INSTALL_DIR} ${PHONENUMBER_LDFLAGS})
+ set(PHONENUMBER_LIB_DIRS ${LIB_INSTALL_DIR})
+ set(PHONENUMBER_LDFLAGS -L${PHONENUMBER_LIB_DIRS} ${PHONENUMBER_LDFLAGS})
else(("${optupper}" STREQUAL "ON") OR ("${substr}" STREQUAL "${CMAKE_BINARY_DIR}"))
set(PHONENUMBER_INCLUDE_DIRS "${WITH_PHONENUMBER}/include")
- set(PHONENUMBER_LDFLAGS -L${WITH_PHONENUMBER}/lib${LIB_SUFFIX} ${PHONENUMBER_LDFLAGS})
+ set(PHONENUMBER_LIB_DIRS ${WITH_PHONENUMBER}/lib${LIB_SUFFIX})
+ set(PHONENUMBER_LDFLAGS -L${PHONENUMBER_LIB_DIRS} ${PHONENUMBER_LDFLAGS})
endif(("${optupper}" STREQUAL "ON") OR ("${substr}" STREQUAL "${CMAKE_BINARY_DIR}"))
unset(bindirlen)
diff --git a/src/addressbook/backends/google/tests/CMakeLists.txt
b/src/addressbook/backends/google/tests/CMakeLists.txt
index 52109671a..dd8280587 100644
--- a/src/addressbook/backends/google/tests/CMakeLists.txt
+++ b/src/addressbook/backends/google/tests/CMakeLists.txt
@@ -3,7 +3,6 @@ set(DEPENDENCIES
)
add_executable(ebookbackendgoogle-phonenumber
- EXCLUDE_FROM_ALL
phone-numbers.c
)
diff --git a/src/addressbook/libebook-contacts/CMakeLists.txt
b/src/addressbook/libebook-contacts/CMakeLists.txt
index 76486cac1..bfda75f41 100644
--- a/src/addressbook/libebook-contacts/CMakeLists.txt
+++ b/src/addressbook/libebook-contacts/CMakeLists.txt
@@ -165,6 +165,7 @@ set(gir_libdirs
${CMAKE_BINARY_DIR}/src/private
${CMAKE_BINARY_DIR}/src/camel
${CMAKE_BINARY_DIR}/src/libedataserver
+ ${PHONENUMBER_LIB_DIRS}
)
set(gir_libs
ebook-contacts
diff --git a/src/addressbook/libebook/CMakeLists.txt b/src/addressbook/libebook/CMakeLists.txt
index a004e99d1..e0926ccde 100644
--- a/src/addressbook/libebook/CMakeLists.txt
+++ b/src/addressbook/libebook/CMakeLists.txt
@@ -107,6 +107,7 @@ set(gir_libdirs
${CMAKE_BINARY_DIR}/src/libedataserver
${CMAKE_BINARY_DIR}/src/addressbook/libebook-contacts
${CMAKE_BINARY_DIR}/src/addressbook/libedata-book
+ ${PHONENUMBER_LIB_DIRS}
)
set(gir_libs
camel
diff --git a/tests/libedata-book/data-test-utils.c b/tests/libedata-book/data-test-utils.c
index 31af1a5a2..f562b5ba1 100644
--- a/tests/libedata-book/data-test-utils.c
+++ b/tests/libedata-book/data-test-utils.c
@@ -199,11 +199,16 @@ e_sqlite_fixture_setup (EbSqlFixture *fixture,
EbSqlClosure *closure = (EbSqlClosure *) user_data;
ESourceBackendSummarySetup *setup = NULL;
gchar *filename, *directory;
+ const gchar *provider_dir;
GError *error = NULL;
- if (!g_file_test (CAMEL_PROVIDERDIR, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS)) {
- if (g_mkdir_with_parents (CAMEL_PROVIDERDIR, 0700) == -1)
- g_warning ("%s: Failed to create folder '%s': %s\n", G_STRFUNC, CAMEL_PROVIDERDIR,
g_strerror (errno));
+ provider_dir = g_getenv (EDS_CAMEL_PROVIDER_DIR);
+ if (!provider_dir)
+ provider_dir = CAMEL_PROVIDERDIR;
+
+ if (!g_file_test (provider_dir, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS)) {
+ if (g_mkdir_with_parents (provider_dir, 0700) == -1)
+ g_warning ("%s: Failed to create folder '%s': %s\n", G_STRFUNC, provider_dir,
g_strerror (errno));
}
fixture->contacts =
diff --git a/tests/libedata-book/test-book-cache-create-cursor.c
b/tests/libedata-book/test-book-cache-create-cursor.c
index c4cc6e153..301a81fcb 100644
--- a/tests/libedata-book/test-book-cache-create-cursor.c
+++ b/tests/libedata-book/test-book-cache-create-cursor.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
static TCUClosure closure = { NULL };
@@ -121,5 +122,5 @@ main (gint argc,
"/EBookCacheCursor/Create/MissingSort", TCUFixture, &closure,
tcu_fixture_setup, test_create_cursor_missing_sort, tcu_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-cursor-calculate.c
b/tests/libedata-book/test-book-cache-cursor-calculate.c
index 522ca6f8b..7eb21b7a3 100644
--- a/tests/libedata-book/test-book-cache-cursor-calculate.c
+++ b/tests/libedata-book/test-book-cache-cursor-calculate.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
static TCUCursorClosure ascending_closure = {
@@ -691,5 +692,5 @@ main (gint argc,
test_cursor_calculate_descending_after_modification,
tcu_cursor_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-cursor-change-locale.c
b/tests/libedata-book/test-book-cache-cursor-change-locale.c
index f95a901e5..ea88b8f61 100644
--- a/tests/libedata-book/test-book-cache-cursor-change-locale.c
+++ b/tests/libedata-book/test-book-cache-cursor-change-locale.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
struct {
@@ -98,5 +99,5 @@ main (gint argc,
}
/* On this case, we want to delete the work directory and start fresh */
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-cursor-move-by-de-DE.c
b/tests/libedata-book/test-book-cache-cursor-move-by-de-DE.c
index 8432f03c6..673123c75 100644
--- a/tests/libedata-book/test-book-cache-cursor-move-by-de-DE.c
+++ b/tests/libedata-book/test-book-cache-cursor-move-by-de-DE.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
struct {
@@ -78,5 +79,5 @@ main (gint argc,
tcu_step_test_add (data, TRUE);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-cursor-move-by-en-US.c
b/tests/libedata-book/test-book-cache-cursor-move-by-en-US.c
index 94955d500..7b88db049 100644
--- a/tests/libedata-book/test-book-cache-cursor-move-by-en-US.c
+++ b/tests/libedata-book/test-book-cache-cursor-move-by-en-US.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
struct {
@@ -96,5 +97,5 @@ main (gint argc,
tcu_step_test_add (data, FALSE);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-cursor-move-by-fr-CA.c
b/tests/libedata-book/test-book-cache-cursor-move-by-fr-CA.c
index 8d71e27cd..81cbe569b 100644
--- a/tests/libedata-book/test-book-cache-cursor-move-by-fr-CA.c
+++ b/tests/libedata-book/test-book-cache-cursor-move-by-fr-CA.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
struct {
@@ -78,5 +79,5 @@ main (gint argc,
tcu_step_test_add (data, TRUE);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-cursor-move-by-posix.c
b/tests/libedata-book/test-book-cache-cursor-move-by-posix.c
index 110cd6cb7..b72c77b03 100644
--- a/tests/libedata-book/test-book-cache-cursor-move-by-posix.c
+++ b/tests/libedata-book/test-book-cache-cursor-move-by-posix.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
struct {
@@ -78,5 +79,5 @@ main (gint argc,
tcu_step_test_add (data, TRUE);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-cursor-set-sexp.c
b/tests/libedata-book/test-book-cache-cursor-set-sexp.c
index 88da7dea5..108b122c3 100644
--- a/tests/libedata-book/test-book-cache-cursor-set-sexp.c
+++ b/tests/libedata-book/test-book-cache-cursor-set-sexp.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
static TCUCursorClosure book_closure = { { NULL }, NULL, E_BOOK_CURSOR_SORT_ASCENDING };
@@ -151,5 +152,5 @@ main (gint argc,
test_cursor_sexp_and_step,
tcu_cursor_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-cursor-set-target.c
b/tests/libedata-book/test-book-cache-cursor-set-target.c
index f2306346a..ee6ba75cf 100644
--- a/tests/libedata-book/test-book-cache-cursor-set-target.c
+++ b/tests/libedata-book/test-book-cache-cursor-set-target.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
/*****************************************************
@@ -221,5 +222,5 @@ main (gint argc,
g_free (path);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-get-contact.c
b/tests/libedata-book/test-book-cache-get-contact.c
index c214d4f63..341e289b4 100644
--- a/tests/libedata-book/test-book-cache-get-contact.c
+++ b/tests/libedata-book/test-book-cache-get-contact.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
static void
@@ -74,5 +75,5 @@ main (gint argc,
tcu_fixture_setup, test_get_contact, tcu_fixture_teardown);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-offline.c b/tests/libedata-book/test-book-cache-offline.c
index ba3ea810f..b0fdc770b 100644
--- a/tests/libedata-book/test-book-cache-offline.c
+++ b/tests/libedata-book/test-book-cache-offline.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "test-book-cache-utils.h"
static void
@@ -1156,5 +1157,5 @@ main (gint argc,
g_test_add ("/EBookCache/Offline/DeleteResync", TCUFixture, &closure,
tcu_fixture_setup, test_offline_delete_resync, tcu_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-book-cache-utils.c b/tests/libedata-book/test-book-cache-utils.c
index 5db16841e..34a92a1d5 100644
--- a/tests/libedata-book/test-book-cache-utils.c
+++ b/tests/libedata-book/test-book-cache-utils.c
@@ -172,11 +172,16 @@ tcu_fixture_setup (TCUFixture *fixture,
TCUClosure *closure = (TCUClosure *) user_data;
ESourceBackendSummarySetup *setup = NULL;
gchar *filename, *directory;
+ const gchar *provider_dir;
GError *error = NULL;
- if (!g_file_test (CAMEL_PROVIDERDIR, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS)) {
- if (g_mkdir_with_parents (CAMEL_PROVIDERDIR, 0700) == -1)
- g_warning ("%s: Failed to create folder '%s': %s\n", G_STRFUNC, CAMEL_PROVIDERDIR,
g_strerror (errno));
+ provider_dir = g_getenv (EDS_CAMEL_PROVIDER_DIR);
+ if (!provider_dir)
+ provider_dir = CAMEL_PROVIDERDIR;
+
+ if (!g_file_test (provider_dir, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS)) {
+ if (g_mkdir_with_parents (provider_dir, 0700) == -1)
+ g_warning ("%s: Failed to create folder '%s': %s\n", G_STRFUNC, provider_dir,
g_strerror (errno));
}
/* Cleanup from last test */
diff --git a/tests/libedata-book/test-sqlite-create-cursor.c b/tests/libedata-book/test-sqlite-create-cursor.c
index 8ad9012fe..61a78e9c6 100644
--- a/tests/libedata-book/test-sqlite-create-cursor.c
+++ b/tests/libedata-book/test-sqlite-create-cursor.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
static EbSqlClosure closure = { FALSE, NULL };
@@ -121,5 +122,5 @@ main (gint argc,
"/EbSqlCursor/Create/MissingSort", EbSqlFixture, &closure,
e_sqlite_fixture_setup, test_create_cursor_missing_sort, e_sqlite_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-cursor-calculate.c
b/tests/libedata-book/test-sqlite-cursor-calculate.c
index 21e543466..e853862df 100644
--- a/tests/libedata-book/test-sqlite-cursor-calculate.c
+++ b/tests/libedata-book/test-sqlite-cursor-calculate.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
static EbSqlCursorClosure ascending_closure = {
@@ -700,5 +701,5 @@ main (gint argc,
test_cursor_calculate_descending_after_modification,
e_sqlite_cursor_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-cursor-change-locale.c
b/tests/libedata-book/test-sqlite-cursor-change-locale.c
index 8fb968fa2..ae7947e6f 100644
--- a/tests/libedata-book/test-sqlite-cursor-change-locale.c
+++ b/tests/libedata-book/test-sqlite-cursor-change-locale.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
struct {
@@ -101,5 +102,5 @@ main (gint argc,
}
/* On this case, we want to delete the work directory and start afresh */
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-de-DE.c
b/tests/libedata-book/test-sqlite-cursor-move-by-de-DE.c
index 8f5ae518d..37d9c2b3e 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-de-DE.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-de-DE.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
struct {
@@ -81,5 +82,5 @@ main (gint argc,
step_test_add (data, TRUE);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
b/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
index b1e3382ec..7123a93de 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-en-US.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
struct {
@@ -99,5 +100,5 @@ main (gint argc,
step_test_add (data, FALSE);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-fr-CA.c
b/tests/libedata-book/test-sqlite-cursor-move-by-fr-CA.c
index e0bd57ac5..9653b64fb 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-fr-CA.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-fr-CA.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
struct {
@@ -81,5 +82,5 @@ main (gint argc,
step_test_add (data, TRUE);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
b/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
index 8b0e34bb3..c77c5e5f6 100644
--- a/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
+++ b/tests/libedata-book/test-sqlite-cursor-move-by-posix.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
struct {
@@ -81,5 +82,5 @@ main (gint argc,
step_test_add (data, TRUE);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-cursor-set-sexp.c
b/tests/libedata-book/test-sqlite-cursor-set-sexp.c
index fc8ee9a25..21957fd65 100644
--- a/tests/libedata-book/test-sqlite-cursor-set-sexp.c
+++ b/tests/libedata-book/test-sqlite-cursor-set-sexp.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
static EbSqlCursorClosure book_closure = { { FALSE, NULL }, NULL, E_BOOK_CURSOR_SORT_ASCENDING };
@@ -150,5 +151,5 @@ main (gint argc,
test_cursor_sexp_and_step,
e_sqlite_cursor_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-cursor-set-target.c
b/tests/libedata-book/test-sqlite-cursor-set-target.c
index 24edec408..a3d9e62c3 100644
--- a/tests/libedata-book/test-sqlite-cursor-set-target.c
+++ b/tests/libedata-book/test-sqlite-cursor-set-target.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
/*****************************************************
@@ -229,5 +230,5 @@ main (gint argc,
g_free (path);
}
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-book/test-sqlite-get-contact.c b/tests/libedata-book/test-sqlite-get-contact.c
index ec9b3e01a..afbc8c951 100644
--- a/tests/libedata-book/test-sqlite-get-contact.c
+++ b/tests/libedata-book/test-sqlite-get-contact.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libebook/libebook.h>
+#include "e-test-server-utils.h"
#include "data-test-utils.h"
static void
@@ -78,5 +79,5 @@ main (gint argc,
paths[i], EbSqlFixture, &closures[i],
e_sqlite_fixture_setup, test_get_contact, e_sqlite_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-cal/CMakeLists.txt b/tests/libedata-cal/CMakeLists.txt
index d5f6145a2..b676fae98 100644
--- a/tests/libedata-cal/CMakeLists.txt
+++ b/tests/libedata-cal/CMakeLists.txt
@@ -2,6 +2,7 @@ set(extra_deps
ebackend
ecal
edata-cal
+ etestserverutils
)
set(extra_defines
diff --git a/tests/libedata-cal/test-cal-cache-getters.c b/tests/libedata-cal/test-cal-cache-getters.c
index 4c054133a..b42a9fd8b 100644
--- a/tests/libedata-cal/test-cal-cache-getters.c
+++ b/tests/libedata-cal/test-cal-cache-getters.c
@@ -19,6 +19,7 @@
#include <locale.h>
#include <libecal/libecal.h>
+#include "e-test-server-utils.h"
#include "test-cal-cache-utils.h"
static ECalComponentId *
@@ -243,5 +244,5 @@ main (gint argc,
g_test_add ("/ECalCache/Getters/All", TCUFixture, &closure_events,
tcu_fixture_setup, test_getters_all, tcu_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-cal/test-cal-cache-intervals.c b/tests/libedata-cal/test-cal-cache-intervals.c
index 449bc0c13..ecf7ce850 100644
--- a/tests/libedata-cal/test-cal-cache-intervals.c
+++ b/tests/libedata-cal/test-cal-cache-intervals.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libecal/libecal.h>
+#include "e-test-server-utils.h"
#include "test-cal-cache-utils.h"
#define NUM_INTERVALS_CLOSED 100
@@ -340,5 +341,5 @@ main (gint argc,
g_test_add ("/ECalCache/Intervals", TCUFixture, NULL,
tcu_fixture_setup, test_intervals, tcu_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-cal/test-cal-cache-offline.c b/tests/libedata-cal/test-cal-cache-offline.c
index 126eae0b4..1fd837841 100644
--- a/tests/libedata-cal/test-cal-cache-offline.c
+++ b/tests/libedata-cal/test-cal-cache-offline.c
@@ -18,6 +18,7 @@
#include <locale.h>
#include <libecal/libecal.h>
+#include "e-test-server-utils.h"
#include "test-cal-cache-utils.h"
static void
@@ -1063,5 +1064,5 @@ main (gint argc,
g_test_add ("/ECalCache/Offline/DeleteResync", TCUFixture, &closure,
tcu_fixture_setup, test_offline_delete_resync, tcu_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-cal/test-cal-cache-search.c b/tests/libedata-cal/test-cal-cache-search.c
index ac662b709..973966513 100644
--- a/tests/libedata-cal/test-cal-cache-search.c
+++ b/tests/libedata-cal/test-cal-cache-search.c
@@ -19,6 +19,7 @@
#include <locale.h>
#include <libecal/libecal.h>
+#include "e-test-server-utils.h"
#include "test-cal-cache-utils.h"
#define dd(x)
@@ -469,5 +470,5 @@ main (gint argc,
g_test_add ("/ECalCache/Search/Complex", TCUFixture, &closure_events,
tcu_fixture_setup, test_search_complex, tcu_fixture_teardown);
- return g_test_run ();
+ return e_test_server_utils_run_full (0);
}
diff --git a/tests/libedata-cal/test-cal-cache-utils.c b/tests/libedata-cal/test-cal-cache-utils.c
index 8144aa7ec..8ccc20fae 100644
--- a/tests/libedata-cal/test-cal-cache-utils.c
+++ b/tests/libedata-cal/test-cal-cache-utils.c
@@ -60,11 +60,16 @@ tcu_fixture_setup (TCUFixture *fixture,
{
const TCUClosure *closure = user_data;
gchar *filename, *directory;
+ const gchar *provider_dir;
GError *error = NULL;
- if (!g_file_test (CAMEL_PROVIDERDIR, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS)) {
- if (g_mkdir_with_parents (CAMEL_PROVIDERDIR, 0700) == -1)
- g_warning ("%s: Failed to create folder '%s': %s\n", G_STRFUNC, CAMEL_PROVIDERDIR,
g_strerror (errno));
+ provider_dir = g_getenv (EDS_CAMEL_PROVIDER_DIR);
+ if (!provider_dir)
+ provider_dir = CAMEL_PROVIDERDIR;
+
+ if (!g_file_test (provider_dir, G_FILE_TEST_IS_DIR | G_FILE_TEST_EXISTS)) {
+ if (g_mkdir_with_parents (provider_dir, 0700) == -1)
+ g_warning ("%s: Failed to create folder '%s': %s\n", G_STRFUNC, provider_dir,
g_strerror (errno));
}
/* Cleanup from last test */
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index 433bbdd6d..8f8bb4159 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -257,16 +257,17 @@ setup_environment (void)
g_string_append_printf (libs_dir, EDS_TEST_TOP_BUILD_DIR x); \
} G_STMT_END
- add_lib_path ("addressbook/libebook");
- add_lib_path ("addressbook/libebook-contacts");
- add_lib_path ("addressbook/libedata-book");
- add_lib_path ("calendar/libecal");
- add_lib_path ("calendar/libedata-cal");
- add_lib_path ("camel");
- add_lib_path ("libebackend");
- add_lib_path ("libedataserver");
- add_lib_path ("libedataserverui");
- add_lib_path ("private");
+ add_lib_path ("/addressbook/libebook");
+ add_lib_path ("/addressbook/libebook-contacts");
+ add_lib_path ("/addressbook/libedata-book");
+ add_lib_path ("/calendar/libecal");
+ add_lib_path ("/calendar/libedata-cal");
+ add_lib_path ("/camel");
+ add_lib_path ("/libebackend");
+ add_lib_path ("/libedataserver");
+ add_lib_path ("/libedataserverui");
+ add_lib_path ("/private");
+ add_lib_path ("/../tests/test-server-utils");
#undef add_lib_path
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]