Run tests under valgrind, if available.
authorSimon Josefsson <simon@josefsson.org>
Wed, 10 May 2006 09:06:32 +0000 (09:06 +0000)
committerSimon Josefsson <simon@josefsson.org>
Wed, 10 May 2006 09:06:32 +0000 (09:06 +0000)
tests/Makefile.am

index 0ac13af..0eb1ee9 100644 (file)
@@ -10,6 +10,9 @@ Test_parser_LDADD = ../lib/libtasn1.la
 Test_tree_SOURCES = Test_tree.c  
 Test_tree_LDADD = ../lib/libtasn1.la
 
+VALGRIND=valgrind --leak-check=full --leak-resolution=high \
+       --show-reachable=yes --num-callers=50
 TESTS_ENVIRONMENT = \
        ASN1PARSER=$(srcdir)/Test_parser.asn \
-       ASN1TREE=$(srcdir)/Test_tree.asn
+       ASN1TREE=$(srcdir)/Test_tree.asn \
+       `if type valgrind > /dev/null 2>&1; then echo $(VALGRIND); else echo $$SHELL -c; fi`