summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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}