aboutsummaryrefslogtreecommitdiff
path: root/malloc
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-23 01:23:29 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-23 01:23:29 +0000
commit3f36c56313e3694e079494690adf610f484d59b8 (patch)
treeacf127476de69e235ca00662c4dab486bba18040 /malloc
parent5df3a3730011a367c5c8a65c3c9c7e986a0f7a87 (diff)
downloadglibc-3f36c56313e3694e079494690adf610f484d59b8.tar
glibc-3f36c56313e3694e079494690adf610f484d59b8.tar.gz
glibc-3f36c56313e3694e079494690adf610f484d59b8.tar.bz2
glibc-3f36c56313e3694e079494690adf610f484d59b8.zip
Update.
2000-07-22 Ulrich Drepper <drepper@redhat.com> * grp/Makefile: Change Makefiles and tests to run only when necessary. * malloc/Makefile: Likewise. * malloc/tst-mtrace.sh: Likewise. * posix/Makefile: Likewise. * posix/globtest.sh: Likewise. * posix/wordexp-tst.sh: Likewise. * string/Makefile: Likewise.
Diffstat (limited to 'malloc')
-rw-r--r--malloc/Makefile5
-rwxr-xr-xmalloc/tst-mtrace.sh8
2 files changed, 8 insertions, 5 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index 7831240e3c..7497908707 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -92,9 +92,8 @@ $(objpfx)libmcheck.a: $(objpfx)mcheck-init.o
lib: $(objpfx)libmcheck.a
ifeq (yes,$(build-shared))
-.PHONY: do-tst-mtrace
-tests: do-tst-mtrace
-do-tst-mtrace: tst-mtrace.sh $(objpfx)tst-mtrace
+tests: $(objpfx)tst-mtrace.out
+$(objpfx)tst-mtrace.out: tst-mtrace.sh $(objpfx)tst-mtrace
$(SHELL) -e $< $(common-objpfx)
endif
diff --git a/malloc/tst-mtrace.sh b/malloc/tst-mtrace.sh
index c0c8458e6d..8e12dd08ea 100755
--- a/malloc/tst-mtrace.sh
+++ b/malloc/tst-mtrace.sh
@@ -21,15 +21,19 @@
common_objpfx=$1; shift
status=0
+trap "rm -f ${common_objpfx}malloc/tst-mtrace.leak; exit 1" 1 2 15
-MALLOC_TRACE=${common_objpfx}tst-mtrace.out \
+MALLOC_TRACE=${common_objpfx}malloc/tst-mtrace.leak \
LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
${common_objpfx}elf/ld.so --library-path $common_objpfx \
${common_objpfx}malloc/tst-mtrace || status=1
if test $status -eq 0 && test -f ${common_objpfx}malloc/mtrace; then
${common_objpfx}malloc/mtrace ${common_objpfx}malloc/tst-mtrace \
- ${common_objpfx}tst-mtrace.out || status=1
+ ${common_objpfx}malloc/tst-mtrace.leak \
+ > ${common_objpfx}malloc/tst-mtrace.out|| status=1
fi
+rm -f ${common_objpfx}malloc/tst-mtrace.leak
+
exit $status