diff options
-rw-r--r-- | meta-oe/recipes-support/libgpiod/files/run-ptest | 12 | ||||
-rw-r--r-- | meta-oe/recipes-support/libgpiod/libgpiod_1.6.2.bb | 14 |
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 | |||
3 | testbin="gpiod-test" | ||
4 | ptestdir=$(dirname "$(readlink -f "$0")") | ||
5 | cd $ptestdir/tests | ||
6 | |||
7 | ./$testbin | ||
8 | if [ $? -ne 0 ]; then | ||
9 | echo "FAIL: $testbin" | ||
10 | else | ||
11 | echo "PASS: $testbin" | ||
12 | fi | ||
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>" | |||
4 | LICENSE = "LGPLv2.1+" | 4 | LICENSE = "LGPLv2.1+" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" | 5 | LIC_FILES_CHKSUM = "file://COPYING;md5=2caced0b25dfefd4c601d92bd15116de" |
6 | 6 | ||
7 | SRC_URI = "https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz" | 7 | SRC_URI = "https://www.kernel.org/pub/software/libs/${BPN}/${BP}.tar.xz \ |
8 | file://run-ptest \ | ||
9 | " | ||
10 | |||
8 | SRC_URI[md5sum] = "4765470becb619fead3cdaeac61b9a77" | 11 | SRC_URI[md5sum] = "4765470becb619fead3cdaeac61b9a77" |
9 | SRC_URI[sha256sum] = "c601e71846f5ab140c83bc757fdd62a4fda24a9cee39cc5e99c96ec2bf1b06a9" | 12 | SRC_URI[sha256sum] = "c601e71846f5ab140c83bc757fdd62a4fda24a9cee39cc5e99c96ec2bf1b06a9" |
10 | 13 | ||
11 | inherit autotools pkgconfig python3native | 14 | inherit autotools pkgconfig python3native ptest |
12 | 15 | ||
13 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" | 16 | PACKAGECONFIG[tests] = "--enable-tests,--disable-tests,kmod udev glib-2.0 catch2" |
14 | PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx" | 17 | PACKAGECONFIG[cxx] = "--enable-bindings-cxx,--disable-bindings-cxx" |
@@ -31,3 +34,10 @@ PACKAGES =+ "${PN}-python" | |||
31 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" | 34 | FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}" |
32 | RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}" | 35 | RRECOMMENDS_PYTHON = "${@bb.utils.contains('PACKAGECONFIG', 'python3', '${PN}-python', '',d)}" |
33 | RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}" | 36 | RRECOMMENDS_${PN}-python += "${RRECOMMENDS_PYTHON}" |
37 | |||
38 | PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'tests', '', d)}" | ||
39 | |||
40 | do_install_ptest() { | ||
41 | install -d ${D}${PTEST_PATH}/tests | ||
42 | cp ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/ | ||
43 | } | ||