[evolution-data-server/openismus-work-master: 7/9] e-test-server-utils.c: Conditionally use direct access to addressbook



commit f4661296806c0b3507894b0866064bfde05c96ff
Author: Tristan Van Berkom <tristanvb openismus com>
Date:   Tue Jan 29 21:25:45 2013 +0900

    e-test-server-utils.c: Conditionally use direct access to addressbook
    
    Use direct access if DEBUG_DIRECT env var is set.

 tests/test-server-utils/e-test-server-utils.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index a69417f..fe2fbc2 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -99,7 +99,13 @@ e_test_server_utils_source_added (ESourceRegistry *registry,
 		if (g_strcmp0 (e_source_get_uid (source), ADDRESS_BOOK_SOURCE_UID) != 0)
 			return;
 
-		pair->fixture->service.book_client = e_book_client_new (source, &error);
+		if (g_getenv ("DEBUG_DIRECT") != NULL)
+			pair->fixture->service.book_client =
+				e_book_client_new_direct (pair->fixture->registry, source, &error);
+		else
+			pair->fixture->service.book_client =
+				e_book_client_new (source, &error);
+
 		if (!pair->fixture->service.book_client)
 			g_error ("Unable to create the test book: %s", error->message);
 



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