]> sourceware.org Git - lvm2.git/commitdiff
tests: fix LD_LIBRARY_PATH
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 31 Mar 2017 13:27:58 +0000 (15:27 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 31 Mar 2017 15:12:00 +0000 (17:12 +0200)
Use only selected paths for finding .so in builddir.
So if builddir constains some embeded subdirs with some more
occurences of project (i.e.  'make rpm' build subdir)
those library paths will not get into list.

test/lib/utils.sh

index ce90cdca0d4212331b5b8c33387ca61c8f2a8a9d..60979cc32ac344332cafc1c2b5fc9272eef1f749 100644 (file)
@@ -258,12 +258,11 @@ if test -z "${installed_testsuite+varset}"; then
     case "$PATH" in
     *"$abs_top_builddir/test/lib"*) ;;
     *)
-           PATH="$abs_top_builddir/test/lib":"$abs_top_builddir/test/api":$PATH
-           for i in `find $abs_top_builddir -name \*.so`; do
-                   p=`dirname $i`
-                   LD_LIBRARY_PATH="$p":$LD_LIBRARY_PATH
-           done
-            export PATH LD_LIBRARY_PATH ;;
+       PATH="$abs_top_builddir/test/lib":"$abs_top_builddir/test/api":$PATH
+       LD_LIBRARY_PATH=$(find -L "$abs_top_builddir/libdm/" "$abs_top_builddir/tools/"\
+               "$abs_top_builddir/daemons/" "$abs_top_builddir/liblvm/"\
+               -name "*.so" -printf "%h:")"$LD_LIBRARY_PATH"
+       export PATH LD_LIBRARY_PATH ;;
     esac
 fi
 
This page took 0.038865 seconds and 5 git commands to generate.