summaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2010-09-10 18:45:05 +0200
committerStephen Gallagher <sgallagh@redhat.com>2010-09-15 11:46:34 -0400
commit95126debf6fc78d63ab29dbae19993ef4992e123 (patch)
tree013904c25d6ec185ad6808c10e235833e2284317 /src/tests
parente44e99804519b37852ee9ea24d18d2d2710110ce (diff)
downloadsssd-95126debf6fc78d63ab29dbae19993ef4992e123.tar.gz
sssd-95126debf6fc78d63ab29dbae19993ef4992e123.tar.bz2
sssd-95126debf6fc78d63ab29dbae19993ef4992e123.zip
Add parameter to skip cleanup in sysdb test
This might be useful for examining the test database manually with LDB tools
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/sysdb-tests.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index dac5a0b7..b320afdd 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -2316,12 +2316,15 @@ int main(int argc, const char *argv[]) {
int ret;
poptContext pc;
int failure_count;
+ int no_cleanup = 0;
Suite *sysdb_suite;
SRunner *sr;
struct poptOption long_options[] = {
POPT_AUTOHELP
SSSD_MAIN_OPTS
+ {"no-cleanup", 'n', POPT_ARG_NONE, &no_cleanup, 0,
+ _("Do not delete the test database after a test run"), NULL },
{ NULL }
};
@@ -2352,7 +2355,7 @@ int main(int argc, const char *argv[]) {
srunner_run_all(sr, CK_ENV);
failure_count = srunner_ntests_failed(sr);
srunner_free(sr);
- if (failure_count == 0) {
+ if (failure_count == 0 && !no_cleanup) {
ret = unlink(TESTS_PATH"/"TEST_CONF_FILE);
if (ret != EOK) {
fprintf(stderr, "Could not delete the test config ldb file (%d) (%s)\n",