Hi,
> On 23 Mar 2026, at 09:22, Shaik Moin via lists.openembedded.org
> <[email protected]> wrote:
First, your From address doesn’t match your Signed-off-by and isn’t obviously
your address. If you have problems sending email from your @kpit.com address
then I suggest you look at using `b4 send` instead: this lets you post patches
without having to actually send email.
> +find "$DIR" -maxdepth 1 -type f -perm -u+x 2>/dev/null \
> + ! -name run-ptest \
> + ! -name ".*" \
> +| sed 's|^\./||' \
> +| LC_ALL=C sort > "$list_tmp"
> +
> +echo "----- Executables are:-----"
> +if [ -s "$list_tmp" ]; then
> + cat "$list_tmp"
> +else
> + echo "(none)"
> +fi
> +echo "----------------------------------------------"
> +
> +while IFS= read -r T; do
If you just put the test binaries into a subdirectory, you can just iterate
over them without needing ten lines of complex logic.
> +do_install_ptest() {
> + t=${D}${PTEST_PATH}
> +
> + # This lets libtool do any needed relinking and install the right
> binary.
> + if [ -x "${B}/libtool" ] && [ -d "${B}/tests" ]; then
> + find "${B}/tests" -maxdepth 1 -type f -perm -111 2>/dev/null \
> + | while IFS= read -r wrapper; do
> + bn=$(basename "$wrapper")
> + case "$bn" in
> + *.a|*.la|*.o|*.lo|*.la~) continue ;;
> + esac
> + [ -e "$t/$bn" ] && continue
> + # Install via libtool using the wrapper
> + "${B}/libtool" --mode=install install -c "$wrapper" "$t/$bn"
> + done
> + fi
> +
> + # install them directly.
> + if [ -d "${B}/tests/.libs" ]; then
> + find "${B}/tests/.libs" -maxdepth 1 -type f -perm -111 2>/dev/null \
> + | while IFS= read -r realbin; do
> + bn=$(basename "$realbin")
> + [ -e "$t/$bn" ] && continue
> + install -m 0755 "$realbin" "$t/$bn"
> + done
> + fi
> +}
Why is there a block for if libsamplerate0 was built without libtool, but also
assumes the libtool directory structure? That makes no sense.
Instead of complex find/while/read loops you can just do something like:
for t in $(makefile-getvar ${B}/Makefile TESTS); do
${B}/libtool —mode=install install ${B}/$t ${D}${PTEST_DIR}/$(basename $t)
done
(makefile-getvar is a utility in oe-core/scripts to get the value of a makefile
variable)
Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#234003):
https://lists.openembedded.org/g/openembedded-core/message/234003
Mute This Topic: https://lists.openembedded.org/mt/118461927/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-