On Mon, 8 Dec 2025, Alex Kiernan wrote:

> On Mon, Dec 8, 2025 at 12:39 PM Robert P. J. Day via
> lists.openembedded.org <[email protected]>
> wrote:
> >
> >
> >   working on a tutorial for ptest and i ran across an oddity under
> > meta-openembedded, not sure if it means something or is just leftover
> > cruft from days gone by. i found three recipes with the following
> > construct (reformatted slightly for visual aesthetics):
> >
> > $ grep -r "PTEST_ENABLED.*run-ptest" *
> >
> > meta-oe/recipes-dbs/mysql/mariadb_11.4.9.bb:SRC_URI +=
> > "${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)}"
> >
> > meta-oe/recipes-devtools/lapack/lapack_3.12.1.bb:
> > ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \
> >
> > meta-oe/recipes-support/re2/re2_2024.03.01.bb:
> > ${@bb.utils.contains('PTEST_ENABLED', '1', 'file://run-ptest', '', d)} \
> >
> >   all three recipes check whether PTEST_ENABLED = 1 before adding
> > file://run-ptest to SRC_URI.
> >
> >   is there any reason for this?
>
> All three gained ptest support in 2023, two from the same author...
> my money's on copy and paste from another recipe.

  so you would agree that while the above PTEST_ENABLED conditional is
technically acceptable in any recipe that provides a *static*
file://run-ptest, it's really unnecessary and might as well use the
simpler non-conditional form for overall consistency.

> > all three recipes inherit ptest, so it
> > seems that they *must* provide a run-ptest file. and even if one does
> > not enable that setting with DISTRO_FEATURES += "ptest", if a recipe
> > inherits ptest, does that not *require* that recipe to make sure a
> > run-ptest file is available if called upon? or am i misreading
> > something?
> >
> > rday
> >
> > p.s. i might ask a similar question about this snippet from
> > ptest.bbclass:
> >
> >     do_install_ptest_base() {
> >         if [ -f ${UNPACKDIR}/run-ptest ]; then
> >             install -D ${UNPACKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
> >         fi
> >
> > if run-ptest does not come from UNPACKDIR, where would it come from?
> > might the recipe generate that file dynamically upon package creation?
> >
>
> The golang classes do exactly that.

  ah, perfect, that was the sort of example i was looking for. and in
cases like that, SRC_URI would obviously *not* include
'file://run-ptest' as that file would not exist.

  good, clarifying stuff a little at a time, thanks.

rday
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#227399): 
https://lists.openembedded.org/g/openembedded-core/message/227399
Mute This Topic: https://lists.openembedded.org/mt/116674580/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to