summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2009-10-30 12:49:55 +0100
committerStephen Gallagher <sgallagh@redhat.com>2009-10-30 08:12:54 -0400
commit5a32ac3ee59c41734ab2fe0f7fa9e0327a4fc8b5 (patch)
treeba39ac543d67c2be11b19acbd9277941c1c91402
parent0d52f24cbfc63742555a4be66fc3795ce5c70349 (diff)
downloadsssd-5a32ac3ee59c41734ab2fe0f7fa9e0327a4fc8b5.tar.gz
sssd-5a32ac3ee59c41734ab2fe0f7fa9e0327a4fc8b5.tar.bz2
sssd-5a32ac3ee59c41734ab2fe0f7fa9e0327a4fc8b5.zip
remove old sysdb file before starting tests
-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);