From 06e85cb08343ec902f0978ab0b6b373f1f1817f3 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn@redhat.com>
Date: Wed, 5 Nov 2014 22:18:05 +0100
Subject: [PATCH 72/75] test_sysdb_views: Use unique directory for cache
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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>
---
src/tests/cmocka/test_sysdb_views.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/tests/cmocka/test_sysdb_views.c b/src/tests/cmocka/test_sysdb_views.c
index 38525d6ded8fdbbd1a657f8ca742e51d6ba2b102..9fb2d7201d06e84be83d6a516c5e3a0f15ec0639 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) {
--
1.9.3