summaryrefslogtreecommitdiffstats
path: root/test/test.sh.in
diff options
context:
space:
mode:
authorQi Wang <interwq@gwu.edu>2017-04-21 21:49:17 (GMT)
committerQi Wang <interwq@gmail.com>2017-04-22 05:52:02 (GMT)
commit3aac709029f053e3329302771ad2069724f461e7 (patch)
tree9e6d9e818d2e04523e69a18d8d2109ba27be2d96 /test/test.sh.in
parent425253e2cd64e23585f557bfa82789a5208d06e1 (diff)
downloadjemalloc-3aac709029f053e3329302771ad2069724f461e7.zip
jemalloc-3aac709029f053e3329302771ad2069724f461e7.tar.gz
jemalloc-3aac709029f053e3329302771ad2069724f461e7.tar.bz2
Output MALLOC_CONF and debug cmd when test failure happens.
Diffstat (limited to 'test/test.sh.in')
-rw-r--r--test/test.sh.in19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/test.sh.in b/test/test.sh.in
index 4d0e0df..39302ff 100644
--- a/test/test.sh.in
+++ b/test/test.sh.in
@@ -41,15 +41,15 @@ for t in $@; do
# execute the test. This allows the shell script to set MALLOC_CONF, which
# is then used to set @JEMALLOC_CPREFIX@MALLOC_CONF (thus allowing the
# per test shell script to ignore the @JEMALLOC_CPREFIX@ detail).
- $(enable_fill=@enable_fill@ \
- enable_prof=@enable_prof@ \
- . @srcroot@${t}.sh && \
- export_malloc_conf && \
- ${t}@exe@ @abs_srcroot@ @abs_objroot@)
+ enable_fill=@enable_fill@ \
+ enable_prof=@enable_prof@ \
+ . @srcroot@${t}.sh && \
+ export_malloc_conf && \
+ $JEMALLOC_TEST_PREFIX ${t}@exe@ @abs_srcroot@ @abs_objroot@
else
- $(export MALLOC_CONF= && \
- export_malloc_conf &&
- ${t}@exe@ @abs_srcroot@ @abs_objroot@)
+ export MALLOC_CONF= && \
+ export_malloc_conf && \
+ $JEMALLOC_TEST_PREFIX ${t}@exe@ @abs_srcroot@ @abs_objroot@
fi
result_code=$?
case ${result_code} in
@@ -63,7 +63,8 @@ for t in $@; do
fail_count=$((fail_count+1))
;;
*)
- echo "Test harness error" 1>&2
+ echo "Test harness error: ${t} w/ MALLOC_CONF=\"${MALLOC_CONF}\"" 1>&2
+ echo "Use prefix to debug, e.g. JEMALLOC_TEST_PREFIX=\"gdb --args\" sh test/test.sh ${t}" 1>&2
exit 1
esac
done