summaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
Diffstat (limited to 'malloc')
-rw-r--r--malloc/Makefile3
-rwxr-xr-xmalloc/tst-mtrace.sh9
2 files changed, 8 insertions, 4 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index 7a716f983f..9e9352341b 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -116,7 +116,8 @@ ifeq ($(run-built-tests),yes)
ifeq (yes,$(build-shared))
ifneq ($(PERL),no)
$(objpfx)tst-mtrace.out: tst-mtrace.sh $(objpfx)tst-mtrace
- $(SHELL) $< $(common-objpfx) '$(test-program-prefix)'; \
+ $(SHELL) $< $(common-objpfx) '$(test-program-prefix-before-env)' \
+ '$(run-program-env)' '$(test-program-prefix-after-env)' ; \
$(evaluate-test)
endif
endif
diff --git a/malloc/tst-mtrace.sh b/malloc/tst-mtrace.sh
index abd425ddf3..446ebec496 100755
--- a/malloc/tst-mtrace.sh
+++ b/malloc/tst-mtrace.sh
@@ -20,14 +20,17 @@
set -e
common_objpfx=$1; shift
-test_program_prefix=$1; shift
+test_program_prefix_before_env=$1; shift
+run_program_env=$1; shift
+test_program_prefix_after_env=$1; shift
status=0
trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
+${test_program_prefix_before_env} \
+${run_program_env} \
MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
-LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
-${test_program_prefix} \
+${test_program_prefix_after_env} \
${common_objpfx}malloc/tst-mtrace || status=1
if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then