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