diff options
author | Bartosz Golaszewski <brgl@bgdev.pl> | 2021-06-02 16:14:59 +0200 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-06-04 07:08:13 -0700 |
commit | 2530ace540da5a79e8a0e352f353be7c4a92bb53 (patch) | |
tree | 933e239e856fe7494ae149b7952649e2ace27c4a /meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | |
parent | 66561c713ed8cdfa7a384eb0ba2c7a211ab5ba1c (diff) | |
download | meta-openembedded-2530ace540da5a79e8a0e352f353be7c4a92bb53.tar.gz |
libgpiod: ptest: run all test-suites if possible
We have four test-suites total in libgpiod: for the core C library,
gpio-tools and for C++ and Python bindings. Modify the recipe to install
all of them depending on build settings and make run-ptest execute them
if available.
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb')
-rw-r--r-- | meta-oe/recipes-support/libgpiod/libgpiod_1.6.3.bb | 20 |
1 files changed, 19 insertions, 1 deletions
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 c0ebb8aa5..874453fbd 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 | } |