summaryrefslogtreecommitdiff
path: root/test/Makefile
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-10-07 14:48:14 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-10-07 14:48:14 +0000
commit2bdc07b398db1471ebf0fe286519f21a59b8ff8c (patch)
tree8815b61e35e746b64ed8d5f28019ebf1cda97985 /test/Makefile
parent40d513960a50664c3c4130a40612a5e3673615ce (diff)
downloadllvm-2bdc07b398db1471ebf0fe286519f21a59b8ff8c.tar.gz
llvm-2bdc07b398db1471ebf0fe286519f21a59b8ff8c.tar.bz2
llvm-2bdc07b398db1471ebf0fe286519f21a59b8ff8c.tar.xz
add support for running the test suite with valgrind. to run it just type 'make VG=1', as in clang
beware of the 42000 leaks reported by valgrind in the Constant.cpp + Type.cpp files. it needs fixing IMHO git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57245 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Makefile')
-rw-r--r--test/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/test/Makefile b/test/Makefile
index 67644ce66e..391776bb4d 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -32,6 +32,10 @@ CLEANED_TESTSUITE := $(patsubst test/%,%,$(CLEANED_TESTSUITE))
RUNTESTFLAGS += --tool $(CLEANED_TESTSUITE)
endif
+ifdef VG
+VALGRIND := valgrind --tool=memcheck --quiet --trace-children=yes --error-exitcode=3 --leak-check=full
+endif
+
IGNORE_TESTS :=
ifndef RUNLLVM2CPP
@@ -77,7 +81,9 @@ endif
clean::
$(RM) -rf `find $(LLVM_OBJ_ROOT)/test -name Output -type d -print`
-site.exp: Makefile $(LLVM_OBJ_ROOT)/Makefile.config
+FORCE:
+
+site.exp: FORCE
@echo 'Making a new site.exp file...'
@echo '## these variables are automatically generated by make ##' >site.tmp
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
@@ -103,6 +109,7 @@ site.exp: Makefile $(LLVM_OBJ_ROOT)/Makefile.config
@echo 'set llvmgccmajvers "$(LLVMGCC_MAJVERS)"' >> site.tmp
@echo 'set shlibext "$(SHLIBEXT)"' >> site.tmp
@echo 'set ocamlc "$(OCAMLC) -cc $(CXX) -I $(LibDir)/ocaml"' >> site.tmp
+ @echo 'set valgrind "$(VALGRIND)"' >> site.tmp
@echo '## All variables above are generated by configure. Do Not Edit ## ' >>site.tmp
@test ! -f site.exp || \
sed '1,/^## All variables above are.*##/ d' site.exp >> site.tmp