diff options
| -rw-r--r-- | meta-networking/recipes-connectivity/nanomsg/nanomsg/run-ptest | 16 | ||||
| -rw-r--r-- | meta-networking/recipes-connectivity/nanomsg/nanomsg_1.2.2.bb | 17 |
2 files changed, 31 insertions, 2 deletions
diff --git a/meta-networking/recipes-connectivity/nanomsg/nanomsg/run-ptest b/meta-networking/recipes-connectivity/nanomsg/nanomsg/run-ptest new file mode 100644 index 0000000000..447867aedb --- /dev/null +++ b/meta-networking/recipes-connectivity/nanomsg/nanomsg/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 | ||
| 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/nanomsg_1.2.2.bb b/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.2.2.bb index 10ae7a61d7..f291326c80 100644 --- a/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.2.2.bb +++ b/meta-networking/recipes-connectivity/nanomsg/nanomsg_1.2.2.bb | |||
| @@ -10,19 +10,32 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=587b3fd7fd291e418ff4d2b8f3904755" | |||
| 10 | SECTION = "libs/networking" | 10 | SECTION = "libs/networking" |
| 11 | 11 | ||
| 12 | SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https;branch=master \ | 12 | SRC_URI = "git://github.com/nanomsg/nanomsg.git;protocol=https;branch=master \ |
| 13 | file://run-ptest \ | ||
| 13 | " | 14 | " |
| 14 | 15 | ||
| 15 | SRCREV = "ccd7f20c1b756f7041598383baffcdc326246db7" | 16 | SRCREV = "ccd7f20c1b756f7041598383baffcdc326246db7" |
| 16 | 17 | ||
| 17 | inherit cmake pkgconfig | 18 | inherit cmake pkgconfig ptest |
| 18 | 19 | ||
| 19 | # nanomsg documentation generation requires asciidoctor, | 20 | # nanomsg documentation generation requires asciidoctor, |
| 20 | # not asciidoc, and currently there's no asciidoctor-native | 21 | # not asciidoc, and currently there's no asciidoctor-native |
| 21 | # recipe anywhere in openembedded-core or meta-openembedded | 22 | # recipe anywhere in openembedded-core or meta-openembedded |
| 22 | EXTRA_OECMAKE = " -DNN_ENABLE_DOC=OFF " | 23 | EXTRA_OECMAKE = " -DNN_ENABLE_DOC=OFF \ |
| 24 | ${@bb.utils.contains('PTEST_ENABLED', '1', '-DNN_TESTS=ON', '', d)} \ | ||
| 25 | " | ||
| 23 | 26 | ||
| 24 | # we don't want nanomsg-tools to be renamed to libnanomsg-tools | 27 | # we don't want nanomsg-tools to be renamed to libnanomsg-tools |
| 25 | DEBIAN_NOAUTONAME:${PN}-tools = "1" | 28 | DEBIAN_NOAUTONAME:${PN}-tools = "1" |
| 26 | 29 | ||
| 30 | do_install_ptest(){ | ||
| 31 | install -d ${D}/${PTEST_PATH}/tests | ||
| 32 | find ${B} -maxdepth 1 -type f -executable \ | ||
| 33 | ! -name "*_lat" \ | ||
| 34 | ! -name "*_thr" \ | ||
| 35 | ! -name "nanocat" \ | ||
| 36 | ! -name "libnanomsg.so*" \ | ||
| 37 | -exec install {} ${D}${PTEST_PATH}/tests/ \; | ||
| 38 | } | ||
| 39 | |||
| 27 | PACKAGES =+ "${PN}-tools" | 40 | PACKAGES =+ "${PN}-tools" |
| 28 | FILES:${PN}-tools = "${bindir}/*" | 41 | FILES:${PN}-tools = "${bindir}/*" |
