aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>2023-11-03 21:04:06 +0100
committerKhem Raj <raj.khem@gmail.com>2023-11-03 15:07:16 -0700
commit44bb7f130f21833155b95c0d1280e5fa397c097c (patch)
treee827c61e081191191ba8cfe97a6f7940a3ab7075
parent7e1bcd83fa7b9c004f6e19202807225f65289902 (diff)
downloadmeta-openembedded-contrib-44bb7f130f21833155b95c0d1280e5fa397c097c.tar.gz
libgpiod: update to v2.1
This is a small release bringing in a bunch of improvements and a couple new interfaces. Details are available in NEWS. We need to move the code in recipes around a bit as the tests now use shunit2. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod-2.x/run-ptest2
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod.inc3
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb8
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod_2.1.bb (renamed from meta-oe/recipes-support/libgpiod/libgpiod_2.0.2.bb)7
4 files changed, 14 insertions, 6 deletions
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod-2.x/run-ptest b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/run-ptest
index 9475f02535..29ec0d1027 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod-2.x/run-ptest
+++ b/meta-oe/recipes-support/libgpiod/libgpiod-2.x/run-ptest
@@ -1,6 +1,6 @@
#!/bin/sh
-testbins="gpiod-test gpio-tools-test gpiod-cxx-test"
+testbins="gpiod-test gpio-tools-test.bash gpiod-cxx-test"
ptestdir=$(dirname "$(readlink -f "$0")")
cd $ptestdir/tests
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod.inc b/meta-oe/recipes-support/libgpiod/libgpiod.inc
index 0eda47bba0..dc1fb4fe92 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod.inc
+++ b/meta-oe/recipes-support/libgpiod/libgpiod.inc
@@ -33,7 +33,6 @@ FILES:${PN}-tools += " \
FILES:libgpiodcxx = "${libdir}/libgpiodcxx.so.*"
RRECOMMENDS:${PN}-ptest += "coreutils"
-RDEPENDS:${PN}-ptest += "${@bb.utils.contains('PTEST_ENABLED', '1', 'bats', '', d)}"
do_install:append() {
rm -f ${D}${bindir}/gpiod-test
@@ -50,8 +49,6 @@ do_install_ptest() {
# Tools are always built so let's always install them for ptest even if
# we're not selecting libgpiod-tools.
- install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/
- install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/
for tool in ${FILES:${PN}-tools}; do
install ${B}/tools/.libs/$(basename $tool) ${D}${PTEST_PATH}/tests/
done
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
index b28aa8e698..111a5727ba 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.4.bb
@@ -30,9 +30,15 @@ RRECOMMENDS:${PN}-ptest += " \
kernel-module-gpio-mockup \
${@bb.utils.contains('PACKAGECONFIG', 'python3', 'python3-unittest', '', d)} \
"
-RDEPENDS:${PN}-ptest += "python3-packaging"
+RDEPENDS:${PN}-ptest += " \
+ python3-packaging \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'bats', '', d)} \
+"
do_install_ptest:append() {
+ install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/
+ install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/
+
if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then
install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/
fi
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_2.0.2.bb b/meta-oe/recipes-support/libgpiod/libgpiod_2.1.bb
index 7533e0a258..1e92d00790 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_2.0.2.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_2.1.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = " \
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}-2.x:"
-SRC_URI[sha256sum] = "c3c923dc63b7b1b02639c9179c81e3d9febf0887bbaa59775990229cdbedb88b"
+SRC_URI[sha256sum] = "fa4024a080121c958502f9a46a5bda44bea85e7a4dd7fcb3dead463b6fc4261c"
# Enable all project features for ptest
PACKAGECONFIG[tests] = "--enable-tests --enable-tools --enable-bindings-cxx --enable-gpioset-interactive,--disable-tests,kmod util-linux glib-2.0 catch2 libedit"
@@ -20,8 +20,13 @@ FILES:${PN}-tools += "${bindir}/gpionotify"
FILES:${PN}-ptest += "${libdir}/libgpiosim.so.*"
FILES:${PN}-ptest-dev += "${includedir}/gpiosim.h"
+RDEPENDS:${PN}-ptest += " \
+ bash \
+ ${@bb.utils.contains('PTEST_ENABLED', '1', 'shunit2', '', d)} \
+"
RRECOMMENDS:${PN}-ptest += "kernel-module-gpio-sim"
do_install_ptest:append() {
+ install -m 0755 ${S}/tools/gpio-tools-test.bash ${D}${PTEST_PATH}/tests/
install -m 0644 ${S}/tests/gpiosim/gpiosim.h ${D}${includedir}/gpiosim.h
}