From: Felipe Sateler Date: Sun, 3 Jul 2016 15:17:13 +0000 (-0400) Subject: tests: follow RUNPATH when installing missing libraries X-Git-Tag: v231~87^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d7a4278d29fe2ca976ae3db3d12705cdc9dd01be;p=thirdparty%2Fsystemd.git tests: follow RUNPATH when installing missing libraries Fixes #3630 --- diff --git a/test/test-functions b/test/test-functions index 4583c02f972..08a5c655550 100644 --- a/test/test-functions +++ b/test/test-functions @@ -275,10 +275,15 @@ install_systemd() { echo LogLevel=debug >> $initdir/etc/systemd/system.conf } +get_ldpath() { + local _bin="$1" + objdump -p "$_bin" 2>/dev/null | awk "/R(UN)?PATH/ { print \"$initdir\" \$2 }" | paste -sd : +} + install_missing_libraries() { # install possible missing libraries for i in $initdir/{sbin,bin}/* $initdir/lib/systemd/*; do - inst_libs $i + LD_LIBRARY_PATH=$(get_ldpath $i) inst_libs $i done }