From: Ross Burton <Ross.Burton@arm.com>
To: "careers.myinfo@gmail.com" <careers.myinfo@gmail.com>
Cc: "openembedded-core@lists.openembedded.org"
<openembedded-core@lists.openembedded.org>
Subject: Re: [OE-core][master][PATCH v2] libsamplerate0: Adding ptest for libsamplerate0
Date: Thu, 26 Mar 2026 14:05:58 +0000 [thread overview]
Message-ID: <5401DB48-76E2-46F8-B045-14C0F4848C88@arm.com> (raw)
In-Reply-To: <20260323092210.1947308-1-moins@kpit.com>
Hi,
> On 23 Mar 2026, at 09:22, Shaik Moin via lists.openembedded.org <careers.myinfo=gmail.com@lists.openembedded.org> 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
prev parent reply other threads:[~2026-03-26 14:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 9:22 [OE-core][master][PATCH v2] libsamplerate0: Adding ptest for libsamplerate0 Shaik Moin
2026-03-26 14:05 ` Ross Burton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5401DB48-76E2-46F8-B045-14C0F4848C88@arm.com \
--to=ross.burton@arm.com \
--cc=careers.myinfo@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox