From: <mingli.yu@windriver.com>
To: <openembedded-devel@lists.openembedded.org>, <akuster808@gmail.com>
Subject: [meta-oe][hardknott][PATCH 4/7] jemalloc: add ptest support
Date: Tue, 26 Oct 2021 15:58:34 +0800 [thread overview]
Message-ID: <20211026075837.39670-4-mingli.yu@windriver.com> (raw)
In-Reply-To: <20211026075837.39670-1-mingli.yu@windriver.com>
From: Mingli Yu <mingli.yu@windriver.com>
Add ptest support.
Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../recipes-devtools/jemalloc/files/run-ptest | 19 +++++++++++++++++++
.../jemalloc/jemalloc_5.2.1.bb | 17 ++++++++++++++++-
2 files changed, 35 insertions(+), 1 deletion(-)
create mode 100644 meta-oe/recipes-devtools/jemalloc/files/run-ptest
diff --git a/meta-oe/recipes-devtools/jemalloc/files/run-ptest b/meta-oe/recipes-devtools/jemalloc/files/run-ptest
new file mode 100644
index 000000000..ea9d80cbb
--- /dev/null
+++ b/meta-oe/recipes-devtools/jemalloc/files/run-ptest
@@ -0,0 +1,19 @@
+#!/bin/sh
+
+saved_dir=$PWD
+for dir in tests/* ; do
+ cd $dir
+ for atest in * ; do
+ if [ \( -x $atest \) -a \( -f $atest \) ] ; then
+ ./$atest > ${atest}.stdout 2> ${atest}.stderr
+ if [ $? = 0 ] ; then
+ echo "PASS: $dir $atest"
+ rm ${atest}.stdout ${atest}.stderr
+ else
+ echo "FAIL: ${dir}/${atest}"
+ fi
+ fi
+ done
+ cd $saved_dir
+done
+
diff --git a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
index b191f729a..b5d53bb11 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -15,14 +15,29 @@ LIC_FILES_CHKSUM = "file://README;md5=6900e4a158982e4c4715bf16aa54fa10"
SRC_URI = "git://github.com/jemalloc/jemalloc.git \
file://0001-Makefile.in-make-sure-doc-generated-before-install.patch \
+ file://run-ptest \
"
SRCREV = "ea6b3e973b477b8061e0076bb257dbd7f3faa756"
S = "${WORKDIR}/git"
-inherit autotools
+inherit autotools ptest
EXTRA_AUTORECONF += "--exclude=autoheader"
EXTRA_OECONF:append:libc-musl = " --with-jemalloc-prefix=je_"
+
+do_compile_ptest() {
+ oe_runmake tests
+}
+
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ subdirs="test/unit test/integration test/stress "
+ for tooltest in ${subdirs}
+ do
+ cp -r ${B}/${tooltest} ${D}${PTEST_PATH}/tests
+ done
+ find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \;
+}
--
2.17.1
next prev parent reply other threads:[~2021-10-26 8:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-26 7:58 [meta-oe][hardknott][PATCH 1/7] jemalloc: add new recipe mingli.yu
2021-10-26 7:58 ` [meta-oe][hardknott][PATCH 2/7] jemalloc: Fix build on musl mingli.yu
2021-10-26 7:58 ` [meta-oe][hardknott][PATCH 3/7] jemalloc: fix the race during do_install mingli.yu
2021-10-26 7:58 ` mingli.yu [this message]
2021-10-26 7:58 ` [meta-oe][hardknott][PATCH 5/7] jemalloc: improve the ptest output mingli.yu
2021-10-26 7:58 ` [meta-oe][hardknott][PATCH 6/7] jemalloc: improve reproducibility mingli.yu
2021-10-26 7:58 ` [meta-oe][hardknott][PATCH 7/7] jemalloc: set precise BSD license mingli.yu
2021-10-26 11:11 ` [oe] " Anders Montonen
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=20211026075837.39670-4-mingli.yu@windriver.com \
--to=mingli.yu@windriver.com \
--cc=akuster808@gmail.com \
--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;
as well as URLs for NNTP newsgroup(s).