diff options
| -rw-r--r-- | meta-oe/recipes-support/libgpiod/files/run-ptest | 21 | ||||
| -rw-r--r-- | meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | 20 |
2 files changed, 33 insertions, 8 deletions
diff --git a/meta-oe/recipes-support/libgpiod/files/run-ptest b/meta-oe/recipes-support/libgpiod/files/run-ptest index 3ad737dfc8..60c661fc10 100644 --- a/meta-oe/recipes-support/libgpiod/files/run-ptest +++ b/meta-oe/recipes-support/libgpiod/files/run-ptest | |||
| @@ -1,12 +1,19 @@ | |||
| 1 | #!/bin/sh | 1 | #!/bin/sh |
| 2 | 2 | ||
| 3 | testbin="gpiod-test" | 3 | testbins="gpiod-test gpio-tools-test gpiod-cxx-test gpiod_py_test.py" |
| 4 | |||
| 4 | ptestdir=$(dirname "$(readlink -f "$0")") | 5 | ptestdir=$(dirname "$(readlink -f "$0")") |
| 5 | cd $ptestdir/tests | 6 | cd $ptestdir/tests |
| 6 | 7 | ||
| 7 | ./$testbin > ./$testbin.out | 8 | for testbin in $testbins; do |
| 8 | if [ $? -ne 0 ]; then | 9 | if test -e ./$testbin; then |
| 9 | echo "FAIL: $testbin" | 10 | ./$testbin > ./$testbin.out |
| 10 | else | 11 | if [ $? -ne 0 ]; then |
| 11 | echo "PASS: $testbin" | 12 | echo "FAIL: $testbin" |
| 12 | fi | 13 | else |
| 14 | echo "PASS: $testbin" | ||
| 15 | fi | ||
| 16 | else | ||
| 17 | echo "SKIP: $testbin" | ||
| 18 | fi | ||
| 19 | done | ||
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 c0ebb8aa5a..874453fbd6 100644 --- a/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb +++ b/meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | |||
| @@ -53,5 +53,23 @@ PACKAGECONFIG_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'tests | |||
| 53 | 53 | ||
| 54 | do_install_ptest() { | 54 | do_install_ptest() { |
| 55 | install -d ${D}${PTEST_PATH}/tests | 55 | install -d ${D}${PTEST_PATH}/tests |
| 56 | cp ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/ | 56 | |
| 57 | # These are the core C library tests | ||
| 58 | install -m 0755 ${B}/tests/.libs/gpiod-test ${D}${PTEST_PATH}/tests/ | ||
| 59 | |||
| 60 | # Tools are always built so let's always install them for ptest even if | ||
| 61 | # we're not selecting libgpiod-tools. | ||
| 62 | install -m 0755 ${S}/tools/gpio-tools-test ${D}${PTEST_PATH}/tests/ | ||
| 63 | install -m 0755 ${S}/tools/gpio-tools-test.bats ${D}${PTEST_PATH}/tests/ | ||
| 64 | for tool in ${FILES_${PN}-tools}; do | ||
| 65 | install ${B}/tools/.libs/$(basename $tool) ${D}${PTEST_PATH}/tests/ | ||
| 66 | done | ||
| 67 | |||
| 68 | if ${@bb.utils.contains('PACKAGECONFIG', 'cxx', 'true', 'false', d)}; then | ||
| 69 | install -m 0755 ${B}/bindings/cxx/tests/.libs/gpiod-cxx-test ${D}${PTEST_PATH}/tests/ | ||
| 70 | fi | ||
| 71 | |||
| 72 | if ${@bb.utils.contains('PACKAGECONFIG', 'python3', 'true', 'false', d)}; then | ||
| 73 | install -m 0755 ${S}/bindings/python/tests/gpiod_py_test.py ${D}${PTEST_PATH}/tests/ | ||
| 74 | fi | ||
| 57 | } | 75 | } |
