diff options
author | Lukas Slebodnik <lslebodn@redhat.com> | 2015-06-16 14:47:57 +0200 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2015-06-16 18:28:11 +0200 |
commit | 9d69c05084176602c2c0969e51d6a81ed32974ca (patch) | |
tree | 9a2936938e48896a1e98584490bd734ace5300e0 /src | |
parent | dbfc407eef1d9ba2469687c3ffbe7fd8bb111d94 (diff) | |
download | sssd-9d69c05084176602c2c0969e51d6a81ed32974ca.tar.gz sssd-9d69c05084176602c2c0969e51d6a81ed32974ca.tar.xz sssd-9d69c05084176602c2c0969e51d6a81ed32974ca.zip |
test_ipa_subdomains_server: Run clean-up after success
Reviewed-by: Michal Židek <mzidek@redhat.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/cmocka/test_ipa_subdomains_server.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/tests/cmocka/test_ipa_subdomains_server.c b/src/tests/cmocka/test_ipa_subdomains_server.c index 3f62107a2..84b52534d 100644 --- a/src/tests/cmocka/test_ipa_subdomains_server.c +++ b/src/tests/cmocka/test_ipa_subdomains_server.c @@ -729,11 +729,14 @@ static void test_ipa_trust_dir2str(void **state) int main(int argc, const char *argv[]) { int rv; + int no_cleanup = 0; poptContext pc; int opt; struct poptOption long_options[] = { POPT_AUTOHELP SSSD_DEBUG_OPTS + { "no-cleanup", 'n', POPT_ARG_NONE, &no_cleanup, 0, + _("Do not delete the test database after a test run"), NULL }, POPT_TABLEEND }; @@ -798,5 +801,9 @@ int main(int argc, const char *argv[]) test_dom_suite_setup(TESTS_PATH); rv = cmocka_run_group_tests(tests, NULL, NULL); + if (rv == 0 && !no_cleanup) { + test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_DB, TEST_DOM_NAME); + } + return rv; } |