summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--server/tests/sysdb-tests.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/server/tests/sysdb-tests.c b/server/tests/sysdb-tests.c
index edd162c9..9d0c60d4 100644
--- a/server/tests/sysdb-tests.c
+++ b/server/tests/sysdb-tests.c
@@ -2309,6 +2309,7 @@ Suite *create_sysdb_suite(void)
int main(int argc, const char *argv[]) {
int opt;
+ int ret;
poptContext pc;
int failure_count;
Suite *sysdb_suite;
@@ -2332,6 +2333,13 @@ int main(int argc, const char *argv[]) {
}
poptFreeContext(pc);
+ 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;
+ }
+
sysdb_suite = create_sysdb_suite();
sr = srunner_create(sysdb_suite);
srunner_run_all(sr, CK_VERBOSE);