From: Roland McGrath Date: Tue, 21 Feb 2012 19:12:46 +0000 (-0800) Subject: test-wrapper.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH. X-Git-Tag: elfutils-0.153~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e3b15685566f6ddcad47c820e77737c2c3c851e4;p=thirdparty%2Felfutils.git test-wrapper.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH. --- diff --git a/tests/ChangeLog b/tests/ChangeLog index e54f5dd8e..38b189d5f 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2012-02-21 Roland McGrath + + * test-wrapper.sh: Add ${libdir}/elfutils to LD_LIBRARY_PATH. + 2012-01-18 Roland McGrath * asm-tst4.c (main): Don't set LD_LIBRARY_PATH in system invocation; diff --git a/tests/test-wrapper.sh b/tests/test-wrapper.sh index 3477e3822..12ab04e39 100755 --- a/tests/test-wrapper.sh +++ b/tests/test-wrapper.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2005 Red Hat, Inc. +# Copyright (C) 2005-2012 Red Hat, Inc. # This file is part of Red Hat elfutils. # # Red Hat elfutils is free software; you can redistribute it and/or modify @@ -46,6 +46,8 @@ else elfutils_testrun=built fi +old_path="${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" + case "$1" in *.sh) export built_library_path program_transform_name elfutils_testrun @@ -53,15 +55,14 @@ case "$1" in ;; *) if [ $elfutils_testrun = built ]; then - LD_LIBRARY_PATH="$built_library_path${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" - export LD_LIBRARY_PATH + LD_LIBRARY_PATH="$built_library_path$old_path" elif [ $elfutils_tests_rpath = yes ]; then echo >&2 installcheck not possible with --enable-tests-rpath exit 77 elif [ "x$libdir" != x/usr/lib ] && [ "x$libdir" != x/usr/lib64 ]; then - LD_LIBRARY_PATH="$libdir${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" - export LD_LIBRARY_PATH + LD_LIBRARY_PATH="${libdir}:${libdir}/elfutils$old_path" fi + export LD_LIBRARY_PATH ;; esac