[evolution-data-server/openismus-work] test-server-utils: Add e_test_server_utils_run_full()
- From: Mathias Hasselmann <hasselmm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/openismus-work] test-server-utils: Add e_test_server_utils_run_full()
- Date: Tue, 5 Mar 2013 13:31:26 +0000 (UTC)
commit 886c6ea35982c87574aa0929daf399ec7ee2ed0f
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.
tests/test-server-utils/e-test-server-utils.c | 9 ++++++++-
tests/test-server-utils/e-test-server-utils.h | 11 ++++++++++-
2 files changed, 18 insertions(+), 2 deletions(-)
---
diff --git a/tests/test-server-utils/e-test-server-utils.c b/tests/test-server-utils/e-test-server-utils.c
index 32e57c2..c4475d8 100644
--- a/tests/test-server-utils/e-test-server-utils.c
+++ b/tests/test-server-utils/e-test-server-utils.c
@@ -415,10 +415,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 39b242f..9348fbe 100644
--- a/tests/test-server-utils/e-test-server-utils.h
+++ b/tests/test-server-utils/e-test-server-utils.h
@@ -136,6 +136,15 @@ struct _ETestServerFixture {
guint timeout_source_id;
};
+/**
+ * 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);
@@ -144,6 +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]