summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta-oe/recipes-support/libgpiod/files/run-ptest12
-rw-r--r--meta-oe/recipes-support/libgpiod/libgpiod_1.6.2.bb14
2 files changed, 24 insertions, 2 deletions
diff --git a/meta-oe/recipes-support/libgpiod/files/run-ptest b/meta-oe/recipes-support/libgpiod/files/run-ptest
new file mode 100644
index 0000000000..4cda05d446
--- /dev/null
+++ b/meta-oe/recipes-support/libgpiod/files/run-ptest
@@ -0,0 +1,12 @@
1#!/bin/sh
2
3testbin="gpiod-test"
4ptestdir=$(dirname "$(readlink -f "$0")")
5cd $ptestdir/tests
6
7./$testbin
8if [ $? -ne 0 ]; then
9 echo "FAIL: $testbin"
10else
11 echo "PASS: $testbin"
12fi
diff --git a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.2.bb b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.2.bb
index c0cf545892..e6b6476e29 100644
--- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.2.bb
+++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.2.bb
@@ -4,11 +4,14 @@ AUTHOR = "Bartosz Golaszewski <bgolaszewski@baylibre.com>"
4LICENSE = "LGPLv2.1+" 4LICENSE = "LGPLv2.1+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" 5LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de"
6 6
7SRC_URI = "https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz" 7SRC_URI = "https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz \
8 file://run-ptest \
9"
10
8SRC_URI[md5sum] = "4765470becb619fead3cdaeac61b9a77" 11SRC_URI[md5sum] = "4765470becb619fead3cdaeac61b9a77"
9SRC_URI[sha256sum] = "c601e71846f5ab140c83bc757fdd62a4fda24a9cee39cc5e99c96ec2bf1b06a9" 12SRC_URI[sha256sum] = "c601e71846f5ab140c83bc757fdd62a4fda24a9cee39cc5e99c96ec2bf1b06a9"
10 13
11inherit autotools pkgconfig python3native 14inherit autotools pkgconfig python3native ptest
12 15
13PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" 16PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2"
14PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx" 17PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx"
@@ -31,3 +34,10 @@ PACKAGES =+ "${PN}-python"
31FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" 34FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}"
32RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}" 35RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}"
33RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}" 36RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}"
37
38PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'tests', '', d)}"
39
40do_install_ptest() {
41 install -d ${D}${PTEST_PATH}/tests
42 cp ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/
43}