]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
xz: use libtool to install test binaries
authorRoss Burton <ross.burton@arm.com>
Fri, 9 Jan 2026 13:11:29 +0000 (13:11 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 15 Jan 2026 10:16:17 +0000 (10:16 +0000)
If libtool builds a binary it's best to use libtool to install it, as
otherwise you might install a wrapper script or need to make assumptions
about where libtool has put the real binary (as this isn't always .libs)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/xz/xz_5.8.2.bb

index 451d4810bc039074a183ff73bf458081fba986fe..982f5054c3a56320475f6cfe8f4d7bd796815b28 100644 (file)
@@ -57,7 +57,9 @@ do_compile_ptest() {
 
 do_install_ptest () {
     install -d ${D}${PTEST_PATH}/tests
-    find ${B}/tests/.libs -type f -executable -exec cp {} ${D}${PTEST_PATH}/tests \;
+    for f in $(makefile-getvar ${B}/tests/Makefile check_PROGRAMS); do
+        ${B}/libtool --mode=install install ${B}/tests/$f ${D}${PTEST_PATH}/tests
+    done
     cp ${B}/config.h ${D}${PTEST_PATH}
     for i in files xzgrep_expected_output test_files.sh test_scripts.sh test_compress.sh; do
         cp -r ${S}/tests/$i ${D}${PTEST_PATH}/tests