summaryrefslogtreecommitdiff
path: root/src/tests/common_dom.c
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2013-05-22 09:02:24 +0200
committerJakub Hrozek <jhrozek@redhat.com>2013-05-30 13:37:55 +0200
commitb36153ce4c3eeb19274ce32e82949da446184406 (patch)
treee12b73e3421bb334ddea05fedab9572fe1178dfe /src/tests/common_dom.c
parentd65f692d7b7639ed8ba0f5cffa4f88b68056739a (diff)
downloadsssd-b36153ce4c3eeb19274ce32e82949da446184406.tar.gz
sssd-b36153ce4c3eeb19274ce32e82949da446184406.tar.bz2
sssd-b36153ce4c3eeb19274ce32e82949da446184406.zip
Remove empty directories after tests run.
Empty directory tests_path is removed in function test_dom_suite_cleanup. Function test_dom_suite_cleanup is reused in other tests.
Diffstat (limited to 'src/tests/common_dom.c')
-rw-r--r--src/tests/common_dom.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/common_dom.c b/src/tests/common_dom.c
index 00e7f5ae..661271d3 100644
--- a/src/tests/common_dom.c
+++ b/src/tests/common_dom.c
@@ -156,6 +156,14 @@ void test_dom_suite_cleanup(const char *tests_path,
errno, strerror(errno)));
}
+ errno = 0;
+ ret = rmdir(tests_path);
+ if (ret != 0) {
+ DEBUG(SSSDBG_CRIT_FAILURE,
+ ("Could not delete the test dir (%d) (%s)\n",
+ errno, strerror(errno)));
+ }
+
talloc_free(conf_db);
talloc_free(sys_db);
}