summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools
diff options
context:
space:
mode:
authorWentao Zhang <wentao.zhang@windriver.com>2025-10-17 19:31:07 +0200
committerGyorgy Sarvari <skandigraun@gmail.com>2025-10-20 08:53:14 +0200
commitd5f1ba9300f61e598a010495bffed1faf2d7541c (patch)
tree68427826075d0b062283230d95519669e4e00d69 /meta-oe/recipes-devtools
parent2c264246c917ca06d0c9cadbd75196fa70c833be (diff)
downloadmeta-openembedded-d5f1ba9300f61e598a010495bffed1faf2d7541c.tar.gz
jemalloc: include the missing shell scripts and source the corresponds shell scripts for some test cases.
The test cases in jemalloc require the appropriate value to be exported to MALLOC_CONF, which is stored in shell scripts. The privious script just ran the test cases without exporting value, causing the tests to fail. Include the missing shell scripts, and source them before running the test cases now. Signed-off-by: Wentao Zhang <wentao.zhang@windriver.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit b3274b4e90fad106e2e76b48afb866d81170bd6f) Signed-off-by: Gyorgy Sarvari <skandigraun@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools')
-rw-r--r--meta-oe/recipes-devtools/jemalloc/files/run-ptest29
-rw-r--r--meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb7
2 files changed, 33 insertions, 3 deletions
diff --git a/meta-oe/recipes-devtools/jemalloc/files/run-ptest b/meta-oe/recipes-devtools/jemalloc/files/run-ptest
index b351f947e8..5c826a1766 100644
--- a/meta-oe/recipes-devtools/jemalloc/files/run-ptest
+++ b/meta-oe/recipes-devtools/jemalloc/files/run-ptest
@@ -1,9 +1,37 @@
1#!/bin/sh 1#!/bin/sh
2 2
3export MALLOC_CONF_ALL=${MALLOC_CONF}
4# Concatenate the individual test's MALLOC_CONF and MALLOC_CONF_ALL.
5export_malloc_conf() {
6 if [ "x${MALLOC_CONF}" != "x" -a "x${MALLOC_CONF_ALL}" != "x" ] ; then
7 export MALLOC_CONF="${MALLOC_CONF},${MALLOC_CONF_ALL}"
8 else
9 export MALLOC_CONF="${MALLOC_CONF}${MALLOC_CONF_ALL}"
10 fi
11}
12
13
14
3saved_dir=$PWD 15saved_dir=$PWD
4for dir in tests/* ; do 16for dir in tests/* ; do
5 cd $dir 17 cd $dir
6 for atest in * ; do 18 for atest in * ; do
19 if [[ "${atest##*.}" == "sh" ]]; then
20 continue
21 fi
22 if [ -e "${atest}.sh" ] ; then
23 # Source the shell script corresponding to the test in a subshell and
24 # execute the test. This allows the shell script to set MALLOC_CONF, which
25 # is then used to set MALLOC_CONF (thus allowing the
26 # per test shell script to ignore the detail).
27 enable_fill=1 \
28 enable_prof=1 \
29 . $(pwd)/${atest}.sh && \
30 export_malloc_conf
31 else
32 export MALLOC_CONF= && \
33 export_malloc_conf
34 fi
7 if [ \( -x $atest \) -a \( -f $atest \) ] ; then 35 if [ \( -x $atest \) -a \( -f $atest \) ] ; then
8 rm -rf tests.log 36 rm -rf tests.log
9 ./$atest > tests.log 2>&1 37 ./$atest > tests.log 2>&1
@@ -18,4 +46,3 @@ for dir in tests/* ; do
18 done 46 done
19 cd $saved_dir 47 cd $saved_dir
20done 48done
21
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 8618c8c6a7..f3f2a32889 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.2.1.bb
@@ -43,10 +43,13 @@ do_compile_ptest() {
43 43
44do_install_ptest() { 44do_install_ptest() {
45 install -d ${D}${PTEST_PATH}/tests 45 install -d ${D}${PTEST_PATH}/tests
46 subdirs="test/unit test/integration test/stress " 46 subdirs="unit integration stress "
47 for tooltest in ${subdirs} 47 for tooltest in ${subdirs}
48 do 48 do
49 cp -r ${B}/${tooltest} ${D}${PTEST_PATH}/tests 49 cp -r ${B}/test/${tooltest} ${D}${PTEST_PATH}/tests
50 if find ${S}/test/${tooltest}/ -name '*.sh' -print -quit | grep -q .; then
51 cp ${S}/test/${tooltest}/*.sh ${D}${PTEST_PATH}/tests/${tooltest}
52 fi
50 done 53 done
51 find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \; 54 find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \;
52} 55}