]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: pull in weak deps into tests
authorLuca Boccassi <luca.boccassi@microsoft.com>
Wed, 9 Dec 2020 09:15:36 +0000 (10:15 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 9 Dec 2020 12:34:49 +0000 (13:34 +0100)
(Pulled from @bluca's comment here:
https://github.com/systemd/systemd/pull/17884#issuecomment-740005624 and
turned into a commit by @poettering)

test/test-functions

index d5da8e0ea5e621d3078e8e3cd1ab1c5faa10c273..91cd7312d6e6f533832a21944368d535ee22d435 100644 (file)
@@ -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() {