2005-11-17 Roland McGrath <roland@redhat.com>
authorRoland McGrath <roland@redhat.com>
Fri, 18 Nov 2005 02:25:14 +0000 (02:25 +0000)
committerRoland McGrath <roland@redhat.com>
Fri, 18 Nov 2005 02:25:14 +0000 (02:25 +0000)
* Makefile.am (installed_TESTS_ENVIRONMENT): Set libdir, bindir in
environment for test-wrapper.sh.
* test-wrapper.sh: Set LD_LIBRARY_PATH from ${libdir} if not /usr/lib.
* test-subr.sh (installed_testrun): Likewise.
Use explicit path in ${bindir}.

tests/ChangeLog
tests/Makefile.am
tests/test-subr.sh
tests/test-wrapper.sh

index 9c1078e..31613f4 100644 (file)
@@ -1,5 +1,11 @@
 2005-11-17  Roland McGrath  <roland@redhat.com>
 
+       * Makefile.am (installed_TESTS_ENVIRONMENT): Set libdir, bindir in
+       environment for test-wrapper.sh.
+       * test-wrapper.sh: Set LD_LIBRARY_PATH from ${libdir} if not /usr/lib.
+       * test-subr.sh (installed_testrun): Likewise.
+       Use explicit path in ${bindir}.
+
        * Makefile.am (installcheck-local): Fix typo in last change.
 
 2005-11-16  Roland McGrath  <roland@redhat.com>
index 8290a65..5cd35ea 100644 (file)
@@ -96,7 +96,9 @@ EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
             testfile22.bz2 testfile23.bz2 testfile24.bz2 testfile25.bz2 \
             coverage.sh test-subr.sh test-wrapper.sh
 
-installed_TESTS_ENVIRONMENT = $(srcdir)/test-wrapper.sh \
+installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \
+                             bindir=$(DESTDIR)$(bindir) \
+                             $(srcdir)/test-wrapper.sh \
                              installed $(tests_rpath) \
                              $(program_transform_name)
 if STANDALONE
index 6ad31ed..995c495 100644 (file)
@@ -79,10 +79,15 @@ installed_testrun()
     fi
     ;;
   ../*)
-    program=`program_transform ${program##*/}`
+    program=${bindir}/`program_transform ${program##*/}`
     ;;
   esac
-  $program ${1+"$@"}
+  if [ "${libdir}" != /usr/lib ]; then
+    LD_LIBRARY_PATH="${libdir}${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" \
+    $program ${1+"$@"}
+  else
+    $program ${1+"$@"}
+  fi
 }
 
 program_transform()
index 2abcc74..a4f2a21 100755 (executable)
@@ -45,6 +45,9 @@ case "$1" in
   elif [ $elfutils_tests_rpath = yes ]; then
     echo >&2 installcheck not possible with --enable-tests-rpath
     exit 77
+  elif [ "x$libdir" != x/usr/lib ]; then
+    LD_LIBRARY_PATH="$libdir${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH"
+    export LD_LIBRARY_PATH
   fi
   ;;
 esac