[evolution-data-server/openismus-work] test-server-utils: Allow to keep sources



commit 11af3e76ec78f58cfc36b3ef72e14632953e50de
Author: Mathias Hasselmann <mathias openismus com>
Date:   Tue Mar 5 11:01:37 2013 +0100

    test-server-utils: Allow to keep sources
    
    Don't call e_client_remove() and such when keep_work_directory
    is set. This aids reuse and debugging of sources.

 tests/test-server-utils/e-test-server-utils.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index 9593080..32e57c2 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -332,7 +332,7 @@ e_test_server_utils_teardown (ETestServerFixture *fixture,
        switch (closure->type) {
        case E_TEST_SERVER_ADDRESS_BOOK:
        case E_TEST_SERVER_DIRECT_ADDRESS_BOOK:
-               if (!e_client_remove_sync (E_CLIENT (fixture->service.book_client), NULL, &error)) {
+               if (!closure->keep_work_directory && !e_client_remove_sync (E_CLIENT 
(fixture->service.book_client), NULL, &error)) {
                        g_message ("Failed to remove test book: %s (ignoring)", error->message);
                        g_clear_error (&error);
                }
@@ -341,7 +341,7 @@ e_test_server_utils_teardown (ETestServerFixture *fixture,
                break;
 
        case E_TEST_SERVER_DEPRECATED_ADDRESS_BOOK:
-               if (!e_book_remove (fixture->service.book, &error)) {
+               if (!closure->keep_work_directory && !e_book_remove (fixture->service.book, &error)) {
                        g_message ("Failed to remove test book: %s (ignoring)", error->message);
                        g_clear_error (&error);
                }
@@ -350,7 +350,7 @@ e_test_server_utils_teardown (ETestServerFixture *fixture,
                break;
 
        case E_TEST_SERVER_CALENDAR:
-               if (!e_client_remove_sync (E_CLIENT (fixture->service.calendar_client), NULL, &error)) {
+               if (!closure->keep_work_directory && !e_client_remove_sync (E_CLIENT 
(fixture->service.calendar_client), NULL, &error)) {
                        g_message ("Failed to remove test calendar: %s (ignoring)", error->message);
                        g_clear_error (&error);
                }
@@ -359,7 +359,7 @@ e_test_server_utils_teardown (ETestServerFixture *fixture,
                break;
 
        case E_TEST_SERVER_DEPRECATED_CALENDAR:
-               if (!e_cal_remove (fixture->service.calendar, &error)) {
+               if (!closure->keep_work_directory && !e_cal_remove (fixture->service.calendar, &error)) {
                        g_message ("Failed to remove test calendar: %s (ignoring)", error->message);
                        g_clear_error (&error);
                }


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