]> git.saurik.com Git - bison.git/blame - tests/local.mk
* tests/local.mk (TESTSUITE_AT): Add named-refs.at.
[bison.git] / tests / local.mk
CommitLineData
d4977ce3
AD
1## Makefile for Bison testsuite.
2
a8873669
AD
3## Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
4## Free Software Foundation, Inc.
d4977ce3
AD
5
6## This program is free software: you can redistribute it and/or modify
7## it under the terms of the GNU General Public License as published by
8## the Free Software Foundation, either version 3 of the License, or
9## (at your option) any later version.
10##
11## This program is distributed in the hope that it will be useful,
12## but WITHOUT ANY WARRANTY; without even the implied warranty of
13## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14## GNU General Public License for more details.
15##
16## You should have received a copy of the GNU General Public License
17## along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19EXTRA_DIST += $(TESTSUITE_AT) tests/testsuite tests/package.m4
20
21DISTCLEANFILES += tests/atconfig $(check_SCRIPTS)
22MAINTAINERCLEANFILES += $(TESTSUITE)
23
24## ------------ ##
25## package.m4. ##
26## ------------ ##
27
28$(top_srcdir)/tests/package.m4: $(top_srcdir)/configure
29 rm -f $@ $@.tmp
30 { \
31 echo '# Signature of the current package.'; \
32 echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \
33 echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \
34 echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \
35 echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \
36 echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
37 } >$@.tmp
38 mv $@.tmp $@
39
40## ------------ ##
41## Test suite. ##
42## ------------ ##
43
44TESTSUITE_AT = \
45 tests/actions.at \
46 tests/c++.at \
47 tests/calc.at \
48 tests/conflicts.at \
49 tests/cxx-type.at \
50 tests/existing.at \
51 tests/glr-regression.at \
52 tests/headers.at \
53 tests/input.at \
54 tests/java.at \
55 tests/local.at \
c467dc42 56 tests/named-refs.at \
d4977ce3
AD
57 tests/output.at \
58 tests/push.at \
59 tests/reduce.at \
60 tests/regression.at \
61 tests/sets.at \
62 tests/skeletons.at \
63 tests/synclines.at \
64 tests/testsuite.at \
65 tests/torture.at
66
67TESTSUITE = $(top_srcdir)/tests/testsuite
a8873669 68RUN_TESTSUITE = $(TESTSUITE) -C tests $(TESTSUITEFLAGS)
d4977ce3
AD
69
70AUTOTEST = $(AUTOM4TE) --language=autotest
56ddee7f 71AUTOTESTFLAGS = -I $(top_srcdir)/tests
d4977ce3 72$(TESTSUITE): tests/package.m4 $(TESTSUITE_AT)
56ddee7f 73 $(AUTOTEST) $(AUTOTESTFLAGS) $(top_srcdir)/tests/testsuite.at -o $@.tmp
d4977ce3
AD
74 mv $@.tmp $@
75
d4977ce3
AD
76clean-local: clean-local-tests
77clean-local-tests:
2cd1af95 78 test ! -f $(TESTSUITE) || $(TESTSUITE) -C tests --clean
d4977ce3
AD
79
80check-local: tests/atconfig tests/atlocal $(TESTSUITE)
81# Move into tests/ so that testsuite.dir etc. be created there.
a8873669 82 $(RUN_TESTSUITE)
d4977ce3
AD
83
84check_SCRIPTS = tests/bison
85
86# Run the test suite on the *installed* tree.
87installcheck-local:
a8873669 88 $(RUN_TESTSUITE) AUTOTEST_PATH="$(bindir)"
d4977ce3
AD
89
90# Be real mean with it.
91.PHONY: maintainer-check-g++
92maintainer-check-g++: $(TESTSUITE)
a8873669 93 $(RUN_TESTSUITE) CC='$(CXX)'
d4977ce3
AD
94
95.PHONY: maintainer-check-posix
96maintainer-check-posix: $(TESTSUITE)
a8873669 97 $(RUN_TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112
d4977ce3
AD
98
99.PHONY: maintainer-check-valgrind
100maintainer-check-valgrind: $(TESTSUITE)
101 test -z '$(VALGRIND)' || \
102 VALGRIND_OPTS='--leak-check=full --show-reachable=yes' \
a8873669 103 $(RUN_TESTSUITE) PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q'
d4977ce3
AD
104
105.PHONY: maintainer-check
106maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++
107
108.PHONY: maintainer-push-check
109maintainer-push-check:
110 BISON_USE_PUSH_FOR_PULL=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check
111
112.PHONY: maintainer-xml-check
113maintainer-xml-check:
114 BISON_TEST_XML=1 $(MAKE) $(AM_MAKEFLAGS) maintainer-check