From 8ddcc64e343d6023f358a72a9515a0fa112db83b Mon Sep 17 00:00:00 2001 From: Pavel Reichl Date: Wed, 28 May 2014 15:12:06 +0100 Subject: TEST: simple_access & sysdb tests - cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before running tests do cleanup. Reviewed-by: Lukáš Slebodník --- src/tests/simple_access-tests.c | 1 + src/tests/sysdb-tests.c | 8 +------- 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src/tests') diff --git a/src/tests/simple_access-tests.c b/src/tests/simple_access-tests.c index 0fa5d049f..999277340 100644 --- a/src/tests/simple_access-tests.c +++ b/src/tests/simple_access-tests.c @@ -661,6 +661,7 @@ int main(int argc, const char *argv[]) DEBUG_INIT(debug_level); tests_set_cwd(); + test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_FILE, LOCAL_SYSDB_FILE); Suite *s = access_simple_suite(); SRunner *sr = srunner_create(s); diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index e3ed879b6..711d8f493 100644 --- a/src/tests/sysdb-tests.c +++ b/src/tests/sysdb-tests.c @@ -5621,7 +5621,6 @@ Suite *create_sysdb_suite(void) int main(int argc, const char *argv[]) { int opt; - int ret; poptContext pc; int failure_count; int no_cleanup = 0; @@ -5660,12 +5659,7 @@ int main(int argc, const char *argv[]) { tests_set_cwd(); - ret = unlink(TESTS_PATH"/"LOCAL_SYSDB_FILE); - if (ret != EOK && errno != ENOENT) { - fprintf(stderr, "Could not delete the test ldb file (%d) (%s)\n", - errno, strerror(errno)); - return EXIT_FAILURE; - } + test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_FILE, LOCAL_SYSDB_FILE); sysdb_suite = create_sysdb_suite(); sr = srunner_create(sysdb_suite); -- cgit