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 @@ +#!/bin/sh + +RET=0 +cd tests + +for t in $(ls *); do + ./$t > /dev/null + if [ $? -eq 0 ]; then + echo PASS: $t + else + echo FAIL: $t + RET=1 + fi +done + +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" LICENSE = "MIT" LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=a41e579bb4326c21c774f8e51e41d8a3" -SRC_URI = "git://github.com/nanomsg/nng.git;branch=stable;protocol=https" +SRC_URI = "git://github.com/nanomsg/nng.git;branch=stable;protocol=https \ + file://run-ptest \ + " + SRCREV = "84aa701f42968bf536141a24e826da66963b571a" -inherit cmake pkgconfig +inherit cmake pkgconfig ptest -EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_NNGCAT=ON" +EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DNNG_ENABLE_NNGCAT=ON \ + ${@bb.utils.contains('PTEST_ENABLED', '1', '-DNNG_TESTS=ON', '', d)} \ + " PACKAGECONFIG ??= "" PACKAGECONFIG[mbedtls] = "-DNNG_ENABLE_TLS=ON,-DNNG_ENABLE_TLS=OFF,mbedtls" +do_install_ptest(){ + install -d ${D}/${PTEST_PATH}/tests + find ${B}/tests -type f -executable -exec install {} ${D}${PTEST_PATH}/tests/ \; +} + PACKAGES =+ "${PN}-tools" FILES:${PN}-tools = "${bindir}/*"