On 16 Jan 2026, at 09:27, Changqing Li via lists.openembedded.org
<[email protected]> wrote:
> +SRC_URI:append:libc-glibc = " file://run-ptest"
Keep things simple and just add this to SRC_URI, it won’t cause any problems in
musl builds.
> + DEJATOOL=$(make -C testsuite -s -f Makefile -f - <<'EOF'
> +all:
> + $(info $(DEJATOOL))
> +EOF
> +)
You can use makefile-getvar (oe-core/scripts) for this, and do it later.
> + rm -rf ${D}${PTEST_PATH}/testsuite/Makefile*
> + rm -rf ${D}${PTEST_PATH}/testsuite/README
> + find ${D}${PTEST_PATH}/testsuite/ -type f -name "*.o" -exec rm -f {} +
> + find ${D}${PTEST_PATH}/src/ -type f -name "*.o" -exec rm -f {} +
Might be easier to use makefile-getvar to get the list of tests and then
install them directly, instead of copying * and then deleting files.
Also find has a -delete option which is better than -exec rm.
> + DEJATOOL=$(cat ${B}/testsuite/.dejatool)
Just use makefile-getvar here?
> + sed -i -e "s#@DEJATOOL@#$DEJATOOL#g" ${D}${PTEST_PATH}/run-ptest
> + for p in $DEJATOOL; do
> + if [ "$p" = "ps" ]; then
> + install -d ${D}${PTEST_PATH}/src/ps
> + ln -sf ${base_bindir}/ps ${D}${PTEST_PATH}/src/ps/pscommand
> + elif [ "$p" = "sysctl" ]; then
> + ln -sf ${base_sbindir}/$p ${D}${PTEST_PATH}/src/$p
> + elif [ "$p" = "kill" ] || [ "$p" = "pidof" ] || [ "$p" = "watch" ];
> then
> + ln -sf ${base_bindir}/$p ${D}${PTEST_PATH}/src/$p
> + else
> + ln -sf ${bindir}/$p ${D}${PTEST_PATH}/src/$p
> + fi
> + done
Not sure I understand the point of iterating a list and then switching off each
item in the list. Why not just make all those symlinks without the loop and
conditional?
> +RDEPENDS:${PN}-ptest += "dejagnu bash glibc-utils"
Have you verified that it _needs_ bash and we can’t send a little patch to use
sh?
Ross
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#230005):
https://lists.openembedded.org/g/openembedded-core/message/230005
Mute This Topic: https://lists.openembedded.org/mt/117295052/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-