[SSSD] [PATCH] Use ldb modules from build root for tests

Sumit Bose sbose at redhat.com
Tue Nov 24 15:13:03 UTC 2009


Hi,

when running 'make check' on a system where the ldb memberof plugin is
not installed, e.g. every build system where sssd is not installed but
just build, the sysdb test fails in the ASQ test. This patch changes the
ldb module path if sysdb is compiled for the test. Maybe we want to set
the path to something like $(libdir)/ldb for the real case, too?

bye,
Sumit
-------------- next part --------------
>From 7a31bd2b0cd760b9fffa695c3c09e0069c0c523f Mon Sep 17 00:00:00 2001
From: Sumit Bose <sbose at redhat.com>
Date: Tue, 24 Nov 2009 15:19:28 +0100
Subject: [PATCH] Use ldb modules from build root for tests

---
 server/Makefile.am |    1 +
 server/db/sysdb.c  |    4 ++++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/server/Makefile.am b/server/Makefile.am
index c52db19..198d5c4 100644
--- a/server/Makefile.am
+++ b/server/Makefile.am
@@ -412,6 +412,7 @@ sysdb_tests_SOURCES = \
     tests/sysdb-tests.c \
     $(SSSD_UTIL_OBJ)
 sysdb_tests_CFLAGS = \
+    -DSYSDB_TEST \
     $(AM_CFLAGS) \
     $(CHECK_CFLAGS)
 sysdb_tests_LDADD = \
diff --git a/server/db/sysdb.c b/server/db/sysdb.c
index b59ffa4..5a274fb 100644
--- a/server/db/sysdb.c
+++ b/server/db/sysdb.c
@@ -1201,6 +1201,10 @@ static int sysdb_domain_init_internal(TALLOC_CTX *mem_ctx,
         return EIO;
     }
 
+#ifdef SYSDB_TEST
+    ldb_set_modules_dir(ctx->ldb, "./.libs");
+#endif
+
     ret = ldb_connect(ctx->ldb, ctx->ldb_file, 0, NULL);
     if (ret != LDB_SUCCESS) {
         return EIO;
-- 
1.6.5.2



More information about the sssd-devel mailing list