diff options
| -rw-r--r-- | meta-networking/recipes-connectivity/nanomsg/nng/run-ptest | 16 | ||||
| -rw-r--r-- | meta-networking/recipes-connectivity/nanomsg/nng_1.11.bb | 16 |
2 files changed, 29 insertions, 3 deletions
diff --git a/meta-networking/recipes-connectivity/nanomsg/nng/run-ptest b/meta-networking/recipes-connectivity/nanomsg/nng/run-ptest new file mode 100644 index 0000000000..57888a77c9 --- /dev/null +++ b/meta-networking/recipes-connectivity/nanomsg/nng/run-ptest | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | RET=0 | ||
| 4 | cd tests | ||
| 5 | |||
| 6 | for t in $(ls *); do | ||
| 7 | ./$t > /dev/null | ||
| 8 | if [ $? -eq 0 ]; then | ||
| 9 | echo PASS: $t | ||
| 10 | else | ||
| 11 | echo FAIL: $t | ||
| 12 | RET=1 | ||
| 13 | fi | ||
| 14 | done | ||
| 15 | |||
| 16 | exit $RET | ||
diff --git a/meta-networking/recipes-connectivity/nanomsg/nng_1.11.bb b/meta-networking/recipes-connectivity/nanomsg/nng_1.11.bb index e59b7f34e2..031827a5c0 100644 --- a/meta-networking/recipes-connectivity/nanomsg/nng_1.11.bb +++ b/meta-networking/recipes-connectivity/nanomsg/nng_1.11.bb | |||
| @@ -5,16 +5,26 @@ SECTION = "libs/networking" | |||
| 5 | LICENSE = "MIT" | 5 | LICENSE = "MIT" |
| 6 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3" | 6 | LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3" |
| 7 | 7 | ||
| 8 | SRC_URI = "git://github.com/nanomsg/nng.git;branch=stable;protocol=https" | 8 | SRC_URI = "git://github.com/nanomsg/nng.git;branch=stable;protocol=https \ |
| 9 | file://run-ptest \ | ||
| 10 | " | ||
| 11 | |||
| 9 | SRCREV = "84aa701f42968bf536141a24e826da66963b571a" | 12 | SRCREV = "84aa701f42968bf536141a24e826da66963b571a" |
| 10 | 13 | ||
| 11 | inherit cmake pkgconfig | 14 | inherit cmake pkgconfig ptest |
| 12 | 15 | ||
| 13 | EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_NNGCAT=ON" | 16 | EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_NNGCAT=ON \ |
| 17 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DNNG_TESTS=ON', '', d)} \ | ||
| 18 | " | ||
| 14 | 19 | ||
| 15 | PACKAGECONFIG ??= "" | 20 | PACKAGECONFIG ??= "" |
| 16 | 21 | ||
| 17 | PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls" | 22 | PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls" |
| 18 | 23 | ||
| 24 | do_install_ptest(){ | ||
| 25 | install -d ${D}/${PTEST_PATH}/tests | ||
| 26 | find ${B}/tests -type f -executable -exec install {} ${D}${PTEST_PATH}/tests/ \; | ||
| 27 | } | ||
| 28 | |||
| 19 | PACKAGES =+ "${PN}-tools" | 29 | PACKAGES =+ "${PN}-tools" |
| 20 | FILES:${PN}-tools = "${bindir}/*" | 30 | FILES:${PN}-tools = "${bindir}/*" |
