[oe-commits] [meta-openembedded] 04/47: uthash: add ptest support

git at git.openembedded.org git at git.openembedded.org
Mon Jan 22 16:44:05 UTC 2018


This is an automated email from the git hooks/post-receive script.

armin_kuster pushed a commit to branch master-next
in repository meta-openembedded.

commit f6670bff7b00b83bab3a850b5df00c141b19efb8
Author: André Draszik <andre.draszik at jci.com>
AuthorDate: Fri Jan 12 12:29:42 2018 +0000

    uthash: add ptest support
    
    Signed-off-by: André Draszik <andre.draszik at jci.com>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta-oe/recipes-support/uthash/uthash/run-ptest | 10 ++++++++++
 meta-oe/recipes-support/uthash/uthash_2.0.2.bb  | 18 +++++++++++++++++-
 2 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/meta-oe/recipes-support/uthash/uthash/run-ptest b/meta-oe/recipes-support/uthash/uthash/run-ptest
new file mode 100755
index 0000000..14071a6
--- /dev/null
+++ b/meta-oe/recipes-support/uthash/uthash/run-ptest
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+cd tests
+for i in test*[0-9] ; do
+    if ./${i} | cmp -s "${i}.ans" - ; then
+        echo "PASS: ${i}"
+    else
+        echo "FAIL: ${i}"
+    fi
+done
diff --git a/meta-oe/recipes-support/uthash/uthash_2.0.2.bb b/meta-oe/recipes-support/uthash/uthash_2.0.2.bb
index 8a6887e..ccdd13b 100644
--- a/meta-oe/recipes-support/uthash/uthash_2.0.2.bb
+++ b/meta-oe/recipes-support/uthash/uthash_2.0.2.bb
@@ -10,19 +10,35 @@ SECTION = "base"
 LICENSE = "BSD-1-Clause"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=5cc1f1e4c71f19f580458586756c02b4"
 
-SRC_URI = "https://github.com/troydhanson/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz"
+SRC_URI = "\
+    https://github.com/troydhanson/${BPN}/archive/v${PV}.tar.gz;downloadfilename=${BP}.tar.gz \
+    file://run-ptest \
+"
 UPSTREAM_CHECK_URI = "https://github.com/troydhanson/${BPN}/releases"
 
 SRC_URI[md5sum] = "d08632a58674274c9cd87e2930f5696a"
 SRC_URI[sha256sum] = "34a31d51dd7a839819cecd6f46049b4ffe031d7f3147d9a042f5504fdb1348d1"
 
+inherit ptest
+
 do_compile[noexec] = "1"
 
+do_compile_ptest() {
+    oe_runmake -C tests tests_only TEST_TARGET=
+}
+
 do_install () {
     install -dm755 ${D}${includedir}
     install -m0644 src/*.h ${D}${includedir}
 }
 
+do_install_ptest() {
+    install -dm755 ${D}${PTEST_PATH}/tests
+    install -m0755 tests/test*[0-9] ${D}${PTEST_PATH}/tests
+    install -m0644 tests/test*[0-9].ans ${D}${PTEST_PATH}/tests
+    install -m0644 tests/test*[0-9].dat ${D}${PTEST_PATH}/tests
+}
+
 # The main package is empty and non-existent, so -dev
 # should not depend on it...
 RDEPENDS_${PN}-dev = ""

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list