Run tests under valgrind, if available.
[platform/upstream/libtasn1.git] / tests / Makefile.am
1 INCLUDES = -I../lib
2
3 EXTRA_DIST = Test_parser.asn Test_tree.asn Test_tree_asn1_tab.c
4
5 TESTS = Test_parser Test_tree
6 check_PROGRAMS = $(TESTS)
7 Test_parser_SOURCES = Test_parser.c  
8 Test_parser_LDADD = ../lib/libtasn1.la
9
10 Test_tree_SOURCES = Test_tree.c  
11 Test_tree_LDADD = ../lib/libtasn1.la
12
13 VALGRIND=valgrind --leak-check=full --leak-resolution=high \
14         --show-reachable=yes --num-callers=50
15 TESTS_ENVIRONMENT = \
16         ASN1PARSER=$(srcdir)/Test_parser.asn \
17         ASN1TREE=$(srcdir)/Test_tree.asn \
18         `if type valgrind > /dev/null 2>&1; then echo $(VALGRIND); else echo $$SHELL -c; fi`