[meta-oe,1/2] libgpiod: ptest: rrecommend python3-unittest when building python tests

Message ID 20211119122914.28129-1-brgl@bgdev.pl
State New
Headers show
Series [meta-oe,1/2] libgpiod: ptest: rrecommend python3-unittest when building python tests | expand

Commit Message

Bartosz Golaszewski Nov. 19, 2021, 12:29 p.m. UTC
The python test suite uses the unittest module. It's not built by
default in minimal images, so we need to add it RRECOMMENDS explicitly.

Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
---
 meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Patch

diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb
index ac4ba85d7..474784646 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb
@@ -49,7 +49,10 @@  FILES:${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*.so"
 FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a"
 
 RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}"
-RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-mockup"
+RRECOMMENDS:${PN}-ptest += " \
+    kernel-module-gpio-mockup \
+    ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \
+"
 
 PACKAGECONFIG:append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'tests', '', d)}"