From: "André Draszik" <git@andred.net>
To: openembedded-devel@lists.openembedded.org
Subject: [meta-oe][PATCH 2/2] uthash: add ptest support
Date: Fri, 12 Jan 2018 12:29:42 +0000 [thread overview]
Message-ID: <20180112122942.22396-2-git@andred.net> (raw)
In-Reply-To: <20180112122942.22396-1-git@andred.net>
From: André Draszik <andre.draszik@jci.com>
Signed-off-by: André Draszik <andre.draszik@jci.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(-)
create mode 100755 meta-oe/recipes-support/uthash/uthash/run-ptest
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 000000000..14071a649
--- /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 8a6887ef0..ccdd13b32 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 = ""
--
2.15.1
next prev parent reply other threads:[~2018-01-12 12:29 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 12:29 [meta-oe][PATCH 1/2] uthash: update to v2.0.2 André Draszik
2018-01-12 12:29 ` André Draszik [this message]
2018-01-12 12:33 ` André Draszik
2018-01-17 6:20 ` akuster808
2018-01-17 9:58 ` André Draszik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180112122942.22396-2-git@andred.net \
--to=git@andred.net \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox