diff options
author | Jakub Hrozek <jhrozek@redhat.com> | 2010-09-10 18:45:05 +0200 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2010-09-15 11:46:34 -0400 |
commit | 95126debf6fc78d63ab29dbae19993ef4992e123 (patch) | |
tree | 013904c25d6ec185ad6808c10e235833e2284317 /src/tests | |
parent | e44e99804519b37852ee9ea24d18d2d2710110ce (diff) | |
download | sssd-95126debf6fc78d63ab29dbae19993ef4992e123.tar.gz sssd-95126debf6fc78d63ab29dbae19993ef4992e123.tar.xz 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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c index dac5a0b77..b320afdd0 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", |