summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoland McGrath <[email protected]>2005-11-18 02:25:14 +0000
committerRoland McGrath <[email protected]>2005-11-18 02:25:14 +0000
commitaf74f5caf37125be18b1134b3584a7db383d8486 (patch)
tree8bee0fa3d24920ad552dab93ea3c994f8bc3b172 /tests
parent093281dd420f2861c2a213f28cda425142e626b1 (diff)
2005-11-17 Roland McGrath <[email protected]>
* 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}.
Diffstat (limited to 'tests')
-rw-r--r--tests/ChangeLog6
-rw-r--r--tests/Makefile.am4
-rw-r--r--tests/test-subr.sh9
-rwxr-xr-xtests/test-wrapper.sh3
4 files changed, 19 insertions, 3 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 9c1078e0..31613f4e 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,11 @@
2005-11-17 Roland McGrath <[email protected]>
+ * 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 <[email protected]>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8290a65b..5cd35ea1 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -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
diff --git a/tests/test-subr.sh b/tests/test-subr.sh
index 6ad31edb..995c4951 100644
--- a/tests/test-subr.sh
+++ b/tests/test-subr.sh
@@ -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()
diff --git a/tests/test-wrapper.sh b/tests/test-wrapper.sh
index 2abcc74e..a4f2a218 100755
--- a/tests/test-wrapper.sh
+++ b/tests/test-wrapper.sh
@@ -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