summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorFelipe Sateler <fsateler@gmail.com>2016-07-03 11:17:13 -0400
committerFelipe Sateler <fsateler@gmail.com>2016-07-03 18:33:02 -0400
commitd7a4278d29fe2ca976ae3db3d12705cdc9dd01be (patch)
tree29aec95fc28b7c0f7b4b4738e5ca9c561cc77da9 /test
parentb1e67dfe31c6911820eac753f6461e1c9a00f26c (diff)
tests: follow RUNPATH when installing missing libraries
Fixes #3630
Diffstat (limited to 'test')
-rw-r--r--test/test-functions7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/test-functions b/test/test-functions
index 4583c02f97..08a5c65555 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
}