[evolution-data-server/openismus-work-master: 6/83] test-server-utils: Add e_test_server_utils_run_full()



commit 675fa1dea85357df4f0466dcc932db4c70fab720
Author: Mathias Hasselmann <mathias openismus com>
Date:   Tue Mar 5 11:03:24 2013 +0100

    test-server-utils: Add e_test_server_utils_run_full()
    
    Basically this is to tell e_test_server_utils_run() to not
    wipe the working directory before start.
    
    Conflicts:
    
        tests/test-server-utils/e-test-server-utils.h

 tests/test-server-utils/e-test-server-utils.c |    9 ++++++++-
 tests/test-server-utils/e-test-server-utils.h |   11 +++++++++++
 2 files changed, 19 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 9c0f852..32abf31 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -535,10 +535,17 @@ e_test_server_utils_teardown (ETestServerFixture *fixture,
 gint
 e_test_server_utils_run (void)
 {
+       return e_test_server_utils_run_full (0);
+}
+
+gint
+e_test_server_utils_run_full (ETestServerFlags flags)
+{
        gint tests_ret;
 
        /* Cleanup work directory */
-       delete_work_directory ();
+       if ((flags & E_TEST_SERVER_KEEP_WORK_DIRECTORY) == 0)
+               delete_work_directory ();
 
        setup_environment ();
 
diff --git a/tests/test-server-utils/e-test-server-utils.h b/tests/test-server-utils/e-test-server-utils.h
index f0137da..8978124 100644
--- a/tests/test-server-utils/e-test-server-utils.h
+++ b/tests/test-server-utils/e-test-server-utils.h
@@ -136,6 +136,16 @@ struct _ETestServerFixture {
        guint            registry_finalized : 1;
 };
 
+/**
+ * ETestServiceFlags:
+ * @E_TEST_SERVER_KEEP_WORK_DIRECTORY: Don't delete working directory upon startup.
+ *
+ * Instructions upon e_test_server_utils_run_full() operation.
+ */
+typedef enum {
+       E_TEST_SERVER_KEEP_WORK_DIRECTORY = (1 << 0)
+} ETestServerFlags;
+
 void e_test_server_utils_setup    (ETestServerFixture *fixture,
                                   gconstpointer       user_data);
 
@@ -143,5 +153,6 @@ void e_test_server_utils_teardown (ETestServerFixture *fixture,
                                   gconstpointer       user_data);
 
 gint e_test_server_utils_run      (void);
+gint e_test_server_utils_run_full (ETestServerFlags flags);
 
 #endif /* E_TEST_UTILS_H */


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