summaryrefslogtreecommitdiffstats
path: root/src/tests/cmocka/test_sysdb_views.c
diff options
context:
space:
mode:
authorLukas Slebodnik <lslebodn@redhat.com>2014-11-05 22:18:05 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-11-06 19:16:24 +0100
commit0d0e787555efc1e6e4eb39a924bb9861bf2921d5 (patch)
tree3ffb9662939355d5b370436d5fdab070062b59b4 /src/tests/cmocka/test_sysdb_views.c
parent04ba431db8a89916f43666c090080a5f2b7e4b9b (diff)
downloadsssd-0d0e787555efc1e6e4eb39a924bb9861bf2921d5.tar.gz
sssd-0d0e787555efc1e6e4eb39a924bb9861bf2921d5.tar.xz
sssd-0d0e787555efc1e6e4eb39a924bb9861bf2921d5.zip
test_sysdb_views: Use unique directory for cache
Two tests stored cache in the same directory, It can cause failures with parallel execution of tests. sh$ git grep tests_sysdb src/tests/cmocka/test_sysdb_views.c:#define TESTS_PATH "tests_sysdb" src/tests/sysdb-tests.c:#define TESTS_PATH "tests_sysdb" This patch also clean up potential leftovers after previous failed test_sysdb_views before execution of test suite. Reviewed-by: Pavel Březina <pbrezina@redhat.com>
Diffstat (limited to 'src/tests/cmocka/test_sysdb_views.c')
-rw-r--r--src/tests/cmocka/test_sysdb_views.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tests/cmocka/test_sysdb_views.c b/src/tests/cmocka/test_sysdb_views.c
index 38525d6de..9fb2d7201 100644
--- a/src/tests/cmocka/test_sysdb_views.c
+++ b/src/tests/cmocka/test_sysdb_views.c
@@ -30,7 +30,7 @@
#include "tests/cmocka/common_mock.h"
-#define TESTS_PATH "tests_sysdb"
+#define TESTS_PATH "tests_sysdb_views"
#define TEST_CONF_FILE "tests_conf.ldb"
struct sysdb_test_ctx {
@@ -226,6 +226,8 @@ int main(int argc, const char *argv[])
DEBUG_CLI_INIT(debug_level);
tests_set_cwd();
+ test_dom_suite_cleanup(TESTS_PATH, TEST_CONF_FILE, LOCAL_SYSDB_FILE);
+ test_dom_suite_setup(TESTS_PATH);
rv = run_tests(tests);
if (rv == 0 && no_cleanup == 0) {