mirror of
https://git.yoctoproject.org/poky
synced 2026-04-05 08:02:25 +02:00
The do_install_ptest_base function uses 'type -t' command to check whether do_install_ptest is a function and acts correspondingly. However, the 'type' command is a shell builtin and its behavior is not all the same across Linux distros. On ubuntu, if we use #!/bin/sh as the interpreter for the scripts, as in the case of our intermediate scripts, the '-t' option for the 'type' command is not supported. So the check always fails and the do_install_ptest function, even if defined, is not run. The same problem also applies to the do_configure_ptest_base and the do_compile_ptest_base functions. This patch fixes this problem by avoiding using the 'type' builtin command. [YOCTO #5128] (From OE-Core rev: d5a4f031b460437e9501e4e65194ce94d3641130) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
58 lines
1.5 KiB
Plaintext
58 lines
1.5 KiB
Plaintext
# Ptest packages are built indirectly by a distro_feature,
|
|
# no need for them to be a direct target of 'world'
|
|
EXCLUDE_FROM_WORLD = "1"
|
|
|
|
SUMMARY_${PN}-ptest ?= "${SUMMARY} - Package test files"
|
|
DESCRIPTION_${PN}-ptest ?= "${DESCRIPTION} \
|
|
This package contains a test directory ${PTEST_PATH} for package test purposes."
|
|
|
|
PTEST_PATH ?= "${libdir}/${PN}/ptest"
|
|
FILES_${PN}-ptest = "${PTEST_PATH}"
|
|
SECTION_${PN}-ptest = "devel"
|
|
ALLOW_EMPTY_${PN}-ptest = "1"
|
|
PTEST_ENABLED = "${@base_contains("DISTRO_FEATURES", "ptest", "1", "0", d)}"
|
|
RDEPENDS_${PN}-ptest_virtclass-native = ""
|
|
RDEPENDS_${PN}-ptest_virtclass-nativesdk = ""
|
|
|
|
PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'ptest', '${PN}-ptest', '', d)}"
|
|
|
|
do_configure_ptest() {
|
|
:
|
|
}
|
|
|
|
do_configure_ptest_base() {
|
|
if [ ${PTEST_ENABLED} = 1 ]; then
|
|
do_configure_ptest
|
|
fi
|
|
}
|
|
|
|
do_compile_ptest() {
|
|
:
|
|
}
|
|
|
|
do_compile_ptest_base() {
|
|
if [ ${PTEST_ENABLED} = 1 ]; then
|
|
do_compile_ptest
|
|
fi
|
|
}
|
|
|
|
do_install_ptest() {
|
|
:
|
|
}
|
|
|
|
do_install_ptest_base() {
|
|
if [ ${PTEST_ENABLED} = 1 ]; then
|
|
if [ -f ${WORKDIR}/run-ptest ]; then
|
|
install -D ${WORKDIR}/run-ptest ${D}${PTEST_PATH}/run-ptest
|
|
if grep -q install-ptest: Makefile; then
|
|
oe_runmake DESTDIR=${D}${PTEST_PATH} install-ptest
|
|
fi
|
|
do_install_ptest
|
|
fi
|
|
fi
|
|
}
|
|
|
|
addtask configure_ptest_base after do_configure before do_compile
|
|
addtask compile_ptest_base after do_compile before do_install
|
|
addtask install_ptest_base after do_install before do_package
|