summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/jemalloc/files/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-devtools/jemalloc/files/run-ptest')
-rw-r--r--meta-oe/recipes-devtools/jemalloc/files/run-ptest29
1 files changed, 28 insertions, 1 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