libgpiod: ptest: warn if the gpio-mockup kernel module is not selected

libgpiod test-suites work with the gpio-mockup kernel module. When using
linux-yocto, it's enabled using the gpio/mockup.scc kernel feature. Check
if this feature is present in KERNEL_FEATURE and warn if not.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Bartosz Golaszewski
2021-06-02 16:15:00 +02:00
committed by Khem Raj
parent 2530ace540
commit 977c5f5619
@@ -52,6 +52,13 @@ RRECOMMENDS_${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-py
PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'tests', '', d)}"
do_install_ptest() {
if [ "${PREFERRED_PROVIDER_virtual/kernel}" = "linux-yocto" ] && \
${@bb.utils.contains('KERNEL_FEATURES', 'features/gpio/mockup.scc', 'false', 'true',d)}; then
bbwarn "libgpiod test-suites need the gpio-mockup
module and will not work without it. Consider adding
'features/gpio/mockup.scc' to KERNEL_FEATURES"
fi
install -d ${D}${PTEST_PATH}/tests
# These are the core C library tests