libgpiod: ptest: rrecommend python3-unittest when building python tests
PATCH 1/2 libgpiod: ptest: rrecommend python3-unittest when building python tests
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 <[email protected]>
--- meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb +4 -1
@@ -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)}"
Signature · 1 line
2.25.1
PATCH 2/2 libgpiod: ptest: rrecommend coreutils
The bats test suite requires the 'timeout' and 'nl' commands to be available. Busybox' default config doesn't include those. They are built by default by coreutils though, so add it to RRECOMMENDS for ptest.
Signed-off-by Bartosz Golaszewski <[email protected]>
--- meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | 1 + 1 file changed, 1 insertion(+)
meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb +1 -0
@@ -51,6 +51,7 @@ FILES:${PN}-staticdev += "${PYTHON_SITEPACKAGES_DIR}/*.a" RRECOMMENDS:${PN} += "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '', d)}" RRECOMMENDS:${PN}-ptest += " \ kernel-module-gpio-mockup \ + coreutils \ ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \ "
Signature · 1 line
2.25.1