Compare commits

...
Author SHA1 Message Date
Theophile Ranquet fcf845a716 testsuite: introduce --release
* tests/atlocal.in, tests/local.at: Support option --release, which sets
BISON_USE_PUSH_FOR_PULL and BISON_TEST_XML.
* tests/local.mk: Use it for maintainer-release-check.
2013-01-31 17:48:52 +01:00
Theophile Ranquet 3158164614 build: run checks in distinct directories
* tests/local.mk (maintainer-release-check) Import this rule from maint. Run
maintainer-checks in separate directories.
* configure.ac (AC_CONFIG_TESTDIR), tests/local.at: Adjust paths.
2013-01-31 17:48:52 +01:00
4 changed files with 36 additions and 17 deletions
+1 -1
View File
@@ -220,7 +220,7 @@ AC_SUBST([aclocaldir])
AC_CONFIG_FILES([etc/bench.pl], [chmod +x etc/bench.pl]) AC_CONFIG_FILES([etc/bench.pl], [chmod +x etc/bench.pl])
# Initialize the test suite. # Initialize the test suite.
AC_CONFIG_TESTDIR(tests) AC_CONFIG_TESTDIR([tests], [$ac_abs_top_builddir/tests])
AC_CONFIG_FILES([tests/atlocal]) AC_CONFIG_FILES([tests/atlocal])
AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison]) AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
AC_CHECK_PROGS([VALGRIND], [valgrind]) AC_CHECK_PROGS([VALGRIND], [valgrind])
+9
View File
@@ -75,6 +75,15 @@ else
CC_IS_CXX=0 CC_IS_CXX=0
fi fi
# In a similar way, handle --release
if "$at_arg_release"; then
BISON_USE_PUSH_FOR_PULL=1
BISON_TEST_XML=1
else
BISON_USE_PUSH_FOR_PULL=0
BISON_TEST_XML=0
fi
## ------- ## ## ------- ##
## Other. ## ## Other. ##
+5 -2
View File
@@ -734,7 +734,7 @@ m4_define([AT_JAVA_COMPILE],
[AT_KEYWORDS(java) [AT_KEYWORDS(java)
AT_SKIP_IF([[test -z "$CONF_JAVAC"]]) AT_SKIP_IF([[test -z "$CONF_JAVAC"]])
AT_SKIP_IF([[test -z "$CONF_JAVA"]]) AT_SKIP_IF([[test -z "$CONF_JAVA"]])
AT_CHECK([[$SHELL ../../../javacomp.sh ]$1], AT_CHECK([[$SHELL $abs_top_builddir/javacomp.sh ]$1],
[[0]], [ignore], [ignore])]) [[0]], [ignore], [ignore])])
# AT_LANG_COMPILE(OUTPUT, [SOURCES = OUTPUT.c] # AT_LANG_COMPILE(OUTPUT, [SOURCES = OUTPUT.c]
@@ -844,7 +844,7 @@ AT_CHECK([sed >&2 -e '/^profiling:.*:Merge mismatch for summaries/d' stderr],
# AT_JAVA_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR, [PRE]) # AT_JAVA_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR, [PRE])
# ----------------------------------------------------------------- # -----------------------------------------------------------------
m4_define([AT_JAVA_PARSER_CHECK], m4_define([AT_JAVA_PARSER_CHECK],
[AT_CHECK([$5[ $SHELL ../../../javaexec.sh ]$1], [$2], [$3], [$4])]) [AT_CHECK([$5[ $SHELL $abs_top_builddir/javaexec.sh ]$1], [$2], [$3], [$4])])
# AT_TEST_TABLES_AND_PARSE(TITLE, COND-VALUE, TEST-SPEC, # AT_TEST_TABLES_AND_PARSE(TITLE, COND-VALUE, TEST-SPEC,
@@ -1022,6 +1022,9 @@ m4_define([AT_SETUP],
AT_ARG_OPTION([compile-c-with-cxx], AT_ARG_OPTION([compile-c-with-cxx],
[compile C parsers with the C++ compiler]) [compile C parsers with the C++ compiler])
AT_ARG_OPTION([release],
[check xml and use push for pull])
AT_COLOR_TESTS AT_COLOR_TESTS
AT_TESTED([bison]) AT_TESTED([bison])
+21 -14
View File
@@ -80,8 +80,17 @@ $(TESTSUITE): $(TESTSUITE_AT)
## Run the test suite. ## ## Run the test suite. ##
## -------------------- ## ## -------------------- ##
# Move into tests/ so that testsuite.dir etc. be created there. # Move into tests/ so that testsuite.dir etc. be created there. If a suffix is
RUN_TESTSUITE = $(TESTSUITE) -C tests $(TESTSUITEFLAGS) # specified, create it in a corresponding subdirectory of tests/.
RUN_TESTSUITE = dir=tests/$$suf \
&& { test -d $$dir || mkdir $$dir; } \
&& { test -f $$dir/atconfig \
&& diff -q $$dir/atconfig tests/atconfig \
|| cp tests/atconfig $$dir; } \
&& { test -f $$dir/atlocal \
&& diff -q $$dir/atlocal tests/atlocal \
|| cp tests/atlocal $$dir; } \
&& $(TESTSUITE) -C $$dir $$TESTSUITEFLAGS
check_SCRIPTS = $(BISON) tests/atconfig tests/atlocal check_SCRIPTS = $(BISON) tests/atconfig tests/atlocal
RUN_TESTSUITE_deps = $(TESTSUITE) $(check_SCRIPTS) RUN_TESTSUITE_deps = $(TESTSUITE) $(check_SCRIPTS)
@@ -99,28 +108,26 @@ installcheck-local: $(RUN_TESTSUITE_deps)
# Be real mean with it. # Be real mean with it.
.PHONY: maintainer-check-g++ .PHONY: maintainer-check-g++
maintainer-check-g++: $(RUN_TESTSUITE_deps) maintainer-check-g++: $(RUN_TESTSUITE_deps)
$(RUN_TESTSUITE) --compile-c-with-cxx suf=$@ $(RUN_TESTSUITE) --compile-c-with-cxx
.PHONY: maintainer-check-posix .PHONY: maintainer-check-posix
maintainer-check-posix: $(RUN_TESTSUITE_deps) maintainer-check-posix: $(RUN_TESTSUITE_deps)
$(RUN_TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112 suf=$@ $(RUN_TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112
.PHONY: maintainer-check-valgrind .PHONY: maintainer-check-valgrind
maintainer-check-valgrind: $(RUN_TESTSUITE_deps) maintainer-check-valgrind: $(RUN_TESTSUITE_deps)
test -z '$(VALGRIND)' || \ test -z '$(VALGRIND)' || \
$(RUN_TESTSUITE) \ suf=$@ $(RUN_TESTSUITE) \
PREBISON='$(VALGRIND_PREBISON)' PREPARSER='$(VALGRIND) -q' \ PREBISON='$(VALGRIND_PREBISON)' PREPARSER='$(VALGRIND) -q' \
VALGRIND_OPTS='--leak-check=full --show-reachable=yes' VALGRIND_OPTS='--leak-check=full --show-reachable=yes'
.PHONY: maintainer-check .PHONY: maintainer-check
maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++ maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++
.PHONY: maintainer-push-check .PHONY: maintainer-release-check
maintainer-push-check: maintainer-release-check:
$(MAKE) $(AM_MAKEFLAGS) maintainer-check \ $(MAKE) $(AM_MAKEFLAGS) \
TESTSUITEFLAGS='BISON_USE_PUSH_FOR_PULL=1 $(TESTSUITEFLAGS)' maintainer-check-g++ \
maintainer-check-posix \
.PHONY: maintainer-xml-check maintainer-check-valgrind \
maintainer-xml-check: TESTSUITEFLAGS+='--release'
$(MAKE) $(AM_MAKEFLAGS) maintainer-check \
TESTSUITEFLAGS='BISON_TEST_XML=1 $(TESTSUITEFLAGS)'