From: Mingli Yu <[email protected]>

Add ptest support.

Signed-off-by: Mingli Yu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
---
 .../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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#93592): 
https://lists.openembedded.org/g/openembedded-devel/message/93592
Mute This Topic: https://lists.openembedded.org/mt/86597831/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to