summaryrefslogtreecommitdiffstats
path: root/meta-oe
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe')
-rw-r--r--meta-oe/recipes-devtools/jemalloc/files/run-ptest29
-rw-r--r--meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.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 b351f947e..5c826a176 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.3.0.bb b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb
index 950b64ee9..9ad83261e 100644
--- a/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb
+++ b/meta-oe/recipes-devtools/jemalloc/jemalloc_5.3.0.bb
@@ -42,10 +42,13 @@ do_compile_ptest() {
42 42
43do_install_ptest() { 43do_install_ptest() {
44 install -d ${D}${PTEST_PATH}/tests 44 install -d ${D}${PTEST_PATH}/tests
45 subdirs="test/unit test/integration test/stress " 45 subdirs="unit integration stress "
46 for tooltest in ${subdirs} 46 for tooltest in ${subdirs}
47 do 47 do
48 cp -r ${B}/${tooltest} ${D}${PTEST_PATH}/tests 48 cp -r ${B}/test/${tooltest} ${D}${PTEST_PATH}/tests
49 if find ${S}/test/${tooltest}/ -name '*.sh' -print -quit | grep -q .; then
50 cp ${S}/test/${tooltest}/*.sh ${D}${PTEST_PATH}/tests/${tooltest}
51 fi
49 done 52 done
50 find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \; 53 find ${D}${PTEST_PATH}/tests \( -name "*.d" -o -name "*.o" \) -exec rm -f {} \;
51} 54}