bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] build: run checks in distinct directories


From: Akim Demaille
Subject: Re: [PATCH 2/2] build: run checks in distinct directories
Date: Wed, 12 Dec 2012 11:05:27 +0100

Le 12 déc. 2012 à 11:51, Theophile Ranquet <address@hidden> a écrit :

> index f7a6471..48d8cfa 100644
> --- a/tests/local.at
> +++ b/tests/local.at
> @@ -464,7 +464,7 @@ AT_BISON_CHECK_NO_XML($@)])
> # --------------------------------------------------
> # Low-level macro to run bison once.
> m4_define([AT_BISON_CHECK_],
> -[AT_CHECK(AT_QUELL_VALGRIND[[ bison ]]$@)])
> +[AT_CHECK(AT_QUELL_VALGRIND[[$abs_top_builddir/tests/bison ]]$@)])

This is wrong: installcheck will no longer work.  The test suite must rely only 
on PATH.  Fix PATH, not the test suite.

> # AT_BISON_CHECK_WARNINGS(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
> @@ -515,7 +515,8 @@ fi]dnl
> # when a tortured grammar's XML is known to be too large for xsltproc to
> # handle.
> m4_define([AT_BISON_CHECK_NO_XML],
> -[AT_CHECK(m4_null_if([$2], [], [AT_QUELL_VALGRIND ])[[bison ]]$@)
> +[AT_CHECK(m4_null_if([$2], [], [AT_QUELL_VALGRIND ])
> +          [[$abs_top_builddir/tests/bison ]]$@)

Likewise.  Besides, I'm pretty sure you broke the test here, with the 
extraneous \n.

> AT_BISON_CHECK_WARNINGS($@)])
> 
> # AT_BISON_CHECK_XML(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
> @@ -617,7 +618,7 @@ m4_define([AT_JAVA_COMPILE],
> [AT_KEYWORDS(java)
> AT_SKIP_IF([[test -z "$CONF_JAVAC"]])
> AT_SKIP_IF([[test -z "$CONF_JAVA"]])
> -AT_CHECK([[$SHELL ../../../javacomp.sh ]$1],
> +AT_CHECK([[$SHELL $abs_top_builddir/javacomp.sh ]$1],

This is ok though.

>          [[0]], [ignore], [ignore])])
> 
> # AT_LANG_COMPILE(OUTPUT, [SOURCES = OUTPUT.c]
> @@ -727,7 +728,7 @@ AT_CHECK([sed >&2 -e '/^profiling:.*:Merge mismatch for 
> summaries/d' stderr],
> # AT_JAVA_PARSER_CHECK(COMMAND, EXIT-STATUS, EXPOUT, EXPERR, [PRE])
> # -----------------------------------------------------------------
> 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])])

Ditto.

> 
> 
> # AT_TEST_TABLES_AND_PARSE(TITLE, COND-VALUE, TEST-SPEC,
> diff --git a/tests/local.mk b/tests/local.mk
> index dc5b6c4..bf964ac 100644
> --- a/tests/local.mk
> +++ b/tests/local.mk
> @@ -79,8 +79,13 @@ $(TESTSUITE): $(TESTSUITE_AT)
> ## Run the test suite.  ##
> ## -------------------- ##
> 
> -# Move into tests/ so that testsuite.dir etc. be created there.
> -RUN_TESTSUITE = $(TESTSUITE) -C tests $(TESTSUITEFLAGS)
> +# Move into tests/ so that testsuite.dir etc. be created there.  If a suffix 
> is
> +# specified, create it in a corresponding subdirectory of tests/.
> +RUN_TESTSUITE = dir=tests/$$suf;                                     \

I'd prefer that you use && instead of ;, and that you:

  RUN_TESTSUITE =  \
     foo           \
     bar           \
     baz

instead.

> +             test -d $$dir || mkdir $$dir;                           \
> +             test -f tests/$$dir/atconfig || cp tests/atconfig $$dir;\
> +             test -f tests/$$dir/atlocal  || cp tests/atlocal  $$dir;\
> +             $(TESTSUITE) -C $$dir $(TESTSUITEFLAGS)
> check_SCRIPTS = $(BISON) tests/atconfig tests/atlocal
> RUN_TESTSUITE_deps = $(TESTSUITE) $(check_SCRIPTS)
> 
> @@ -98,16 +103,16 @@ installcheck-local: $(RUN_TESTSUITE_deps)
> # Be real mean with it.
> .PHONY: maintainer-check-g++
> maintainer-check-g++: $(RUN_TESTSUITE_deps)
> -     $(RUN_TESTSUITE) --compile-c-with-cxx
> +     suf=$@; $(RUN_TESTSUITE) --compile-c-with-cxx
> 
> .PHONY: maintainer-check-posix
> 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
> maintainer-check-valgrind: $(RUN_TESTSUITE_deps)
>       test -z '$(VALGRIND)' ||                                        \
> -       $(RUN_TESTSUITE)                                              \
> +       suf=$@; $(RUN_TESTSUITE)                                      \
>           PREBISON='$(VALGRIND_PREBISON)' PREPARSER='$(VALGRIND) -q'  \
>           VALGRIND_OPTS='--leak-check=full --show-reachable=yes'
> 
> @@ -121,5 +126,8 @@ maintainer-push-check:
> 
> .PHONY: maintainer-xml-check
> maintainer-xml-check:
> -     $(MAKE) $(AM_MAKEFLAGS) maintainer-check                \
> +     $(MAKE) $(AM_MAKEFLAGS) maintainer-check                        \
>         TESTSUITEFLAGS='BISON_TEST_XML=1 $(TESTSUITEFLAGS)'
> +
> +.PHONY: maintainer-release-check
> +maintainer-release-check: maintainer-check maintainer-push-check 
> maintainer-xml-check

Please, also prepare a patch where the names are more consistent, and 
README-hacking is updated to reflect these changes.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]