summaryrefslogtreecommitdiffstats
path: root/src/tests
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/common.c9
-rw-r--r--src/tests/common.h2
-rw-r--r--src/tests/sysdb-tests.c5
-rw-r--r--src/tests/sysdb_ssh-tests.c5
4 files changed, 21 insertions, 0 deletions
diff --git a/src/tests/common.c b/src/tests/common.c
index 65e695581..54c93e281 100644
--- a/src/tests/common.c
+++ b/src/tests/common.c
@@ -101,3 +101,12 @@ compare_sdap_attr_maps(struct sdap_attr_map *map1, size_t size1,
return EOK;
}
+
+bool ldb_modules_path_is_set(void)
+{
+ if (getenv("LDB_MODULES_PATH")) {
+ return true;
+ }
+
+ return false;
+}
diff --git a/src/tests/common.h b/src/tests/common.h
index b7eee46ef..61dcbf41f 100644
--- a/src/tests/common.h
+++ b/src/tests/common.h
@@ -95,4 +95,6 @@ errno_t test_request_recv(struct tevent_req *req);
int test_ev_loop(struct sss_test_ctx *tctx);
+bool ldb_modules_path_is_set(void);
+
#endif /* !__TESTS_COMMON_H__ */
diff --git a/src/tests/sysdb-tests.c b/src/tests/sysdb-tests.c
index ada0ccc56..d0e64e20e 100644
--- a/src/tests/sysdb-tests.c
+++ b/src/tests/sysdb-tests.c
@@ -5268,6 +5268,11 @@ int main(int argc, const char *argv[]) {
DEBUG_INIT(debug_level);
+ if (!ldb_modules_path_is_set()) {
+ fprintf(stderr, "Warning: LDB_MODULES_PATH is not set, "
+ "will use LDB plugins installed in system paths.\n");
+ }
+
tests_set_cwd();
ret = unlink(TESTS_PATH"/"LOCAL_SYSDB_FILE);
diff --git a/src/tests/sysdb_ssh-tests.c b/src/tests/sysdb_ssh-tests.c
index c69901638..95c57a7eb 100644
--- a/src/tests/sysdb_ssh-tests.c
+++ b/src/tests/sysdb_ssh-tests.c
@@ -405,6 +405,11 @@ int main(int argc, const char *argv[])
DEBUG_INIT(debug_level);
+ if (!ldb_modules_path_is_set()) {
+ fprintf(stderr, "Warning: LDB_MODULES_PATH is not set, "
+ "will use LDB plugins installed in system paths.\n");
+ }
+
tests_set_cwd();
s = create_sysdb_ssh_suite();