[PATCH] ldb: Use libraries from build dir for testsuite

Andreas Schneider asn at samba.org
Tue Jul 4 12:25:24 UTC 2017


On Tuesday, 4 July 2017 14:21:31 CEST Alexander Bokovoy via samba-technical 
wrote:
> On ti, 04 heinä 2017, Lukas Slebodnik via samba-technical wrote:
> > ehlo,
> > 
> > It is almost similar patch as from the thread
> > 
> >  "PATCH] Fix executil of talloc unittest from tarball"
> > 
> > Just for libldb.
> > 
> > LS
> > 
> > From 5dd52177724f6546ffef09b9a8d07abde2adac15 Mon Sep 17 00:00:00 2001
> > From: Lukas Slebodnik <lslebodn at redhat.com>
> > Date: Tue, 4 Jul 2017 00:32:31 +0200
> > Subject: [PATCH] ldb: Use libraries from build dir for testsuite
> > 
> > There was a failure when tests were executed after after extracting
> > ldb tarball.
> > 
> >   sh$ make -j8 check
> >   WAF_MAKE=1 PATH=buildtools/bin:../../buildtools/bin:$PATH waf test
> >   ldbadd: error while loading shared libraries: libldb.so.1: cannot open
> >   shared object file: No such file or directory cat: write error: Broken
> >   pipe
> >   
> >   Traceback (most recent call last):
> >     File "tests/python/api.py", line 10, in <module>
> >     
> >       import ldb
> >   
> >   ImportError: libldb.so.1: cannot open shared object file: No such file
> >   or directory>   
> >   Traceback (most recent call last):
> >     File "tests/python/api.py", line 10, in <module>
> >     
> >       import ldb
> >   
> >   ImportError: libpyldb-util.so.1: cannot open shared object file: No such
> >   file or directory bin/ldb_tdb_mod_op_test: error while loading shared
> >   libraries: libldb.so.1: cannot open shared object file: No such file or
> >   directory testsuite returned 1
> > 
> > Signed-off-by: Lukas Slebodnik <lslebodn at redhat.com>
> > ---
> > 
> >  lib/ldb/wscript | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/lib/ldb/wscript b/lib/ldb/wscript
> > index
> > 58e4d4fea1021478242155e8e71c786563819abc..5189ea43fa77d732f606c06738c9eca
> > cd9eb61fc 100644 --- a/lib/ldb/wscript
> > +++ b/lib/ldb/wscript
> > 
> > @@ -358,7 +358,10 @@ def test(ctx):
> >      shutil.rmtree(test_prefix, ignore_errors=True)
> >      os.makedirs(test_prefix)
> >      os.environ['TEST_DATA_PREFIX'] = test_prefix
> > 
> > -    os.environ['LD_LIBRARY_PATH'] = Utils.g_module.blddir +
> > '/bin/default/lib/ldb' +    os.environ['LDB_MODULES_PATH'] =
> > Utils.g_module.blddir + "/modules/ldb" +   
> > samba_utils.ADD_LD_LIBRARY_PATH('bin/shared')
> > +    samba_utils.ADD_LD_LIBRARY_PATH('bin/shared/private')
> > +
> > 
> >      cmd = 'tests/test-tdb.sh %s' % Utils.g_module.blddir
> >      ret = samba_utils.RUN_COMMAND(cmd)
> >      print("testsuite returned %d" % ret)
> > 
> > @@ -371,8 +374,6 @@ def test(ctx):
> >          extra_env={'SELFTEST_PREFIX': test_prefix})
> >      
> >      print("Python testsuite returned %d" % pyret)
> > 
> > -    os.environ['LDB_MODULES_PATH'] = Utils.g_module.blddir +
> > '/modules/ldb' -    os.environ['LD_LIBRARY_PATH'] = Utils.g_module.blddir
> > + '/bin/default/lib/ldb'> 
> >      cmocka_ret = 0
> >      for test_exe in ['ldb_tdb_mod_op_test',
> >      
> >                       'ldb_msg_test']:
> RB+ by me.


Thanks for the patch. RB+

Pushed to autobuild

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org



More information about the samba-technical mailing list