diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2020-12-09 10:15:36 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2020-12-09 13:34:49 +0100 |
commit | b7fca1b059f9345c0539e07febfa851f80a81f6b (patch) | |
tree | c3c4ba12dc6b1a94a63d56b179a63d5c169329ba | |
parent | 68fdc72cfe19777b8f39a6a13b659e79ead4bee9 (diff) | |
download | systemd-b7fca1b059f9345c0539e07febfa851f80a81f6b.tar.gz |
test: pull in weak deps into tests
(Pulled from @bluca's comment here:
https://github.com/systemd/systemd/pull/17884#issuecomment-740005624 and
turned into a commit by @poettering)
-rw-r--r-- | test/test-functions | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/test-functions b/test/test-functions index d5da8e0ea5..91cd7312d6 100644 --- a/test/test-functions +++ b/test/test-functions @@ -676,6 +676,19 @@ install_missing_libraries() { for i in $initdir{,/usr}/{sbin,bin}/* $initdir{,/usr}/lib/systemd/{,tests/{,manual/,unsafe/}}*; do LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$(get_ldpath $i):$(get_ldpath $i)/src/udev" inst_libs $i done + + # A number of dependencies is now optional via dlopen, so the install + # script will not pick them up, since it looks at linkage. + for lib in libcryptsetup libidn libidn2 pwquality libqrencode; do + if pkg-config --exists ${lib}; then + path=$(pkg-config --variable=libdir ${lib}) + if ! [[ ${lib} =~ ^lib ]]; then + lib="lib${lib}" + fi + inst_libs "${path}/${lib}.so" + inst_library "${path}/${lib}.so" + fi + done } cleanup_loopdev() { |