tests/yacc-basic.test


Log

Author Commit Date CI Message
Stefano Lattarini 641a5a4b 2012-02-16T10:46:23 maint: run "make update-copyright"
Stefano Lattarini e6c40d4b 2012-02-12T15:06:17 Merge branch 'yacc-work' into yl-work-for-master * yacc-work: (37 commits) fixup: list of yacc/lex tests was botched tests: work around bug#7884 in many yacc/lex tests yacc/lex tests: remove an unneeded workaround for bug#8485 yacc/lex tests: avoid too much failures with FreeBSD make yacc-dist-nobuild.test: add reference to bug#7884 yacc tests: fix bug in 'yacc-cxx.test' lex tests: fix spurious link errors on Solaris lex: "make clean" removes .c files from non-distributed .l lex tests: make test on Lex dependency tracking more "semantic" lex tests: remove erroneous check about ylwrap distribution yacc tests: "make clean" removes C++ files from non-distributed .y tests: add a workaround for automake bug#8485 tests: add a couple of inter-tests reference lex tests: require just `lex' instead of `flex' fix typo in ChangeLog (2011-05-04) tests defs: use `skip_' for skipping yacc/lex related tests lex/yacc tests: remove redundant $distdir definition coverage: test lex-generated "#line" directives postprocessing tests: minor improvements to a couple of yacc tests tests: fix spurious failure in test 'yacc-d-cxx.test' ... + Extra non-trivial edits: * tests/defs.in: Delete; the differences from maint has been merged into 'tests/defs' and 'tests/defs-static.in'. * tests/defs (yacc, lex): Use 'skip_all_', not 'skip_', to skip the whole test case if yacc (resp. lex) is missing. (bison): New, set up the environment so that 'bison -y' will be used as the yacc program. (useless_vpath_rebuild, yl_distcheck): Moved in from 'tests/defs.in'. * tests/defs-static.in ($YACC, $LEX): Default to the values determined at configure time, and allow them to be overridden by the more namespace-safe variables '$AM_TESTSUITE_YACC' and '$AM_TESTSUITE_LEX' respectively. * tests/Makefile.am (do_subst): Also substitute '@YACC@' and '@LEX@'. * Several tests: Fix requirements declarations, by preferring 'lex' and 'yacc' over 'flex' and 'bison' whenever possible.
Stefano Lattarini 818bc406 2012-02-07T09:30:37 tests: work around bug#7884 in many yacc/lex tests Due to automake bug#7884, many test cases on Yacc/Lex support are failing when run with FreeBSD make. Since these failures are all due to the same bug, and that bug is well understood and already explicitly exposed in the dedicated 'yacc-dist-nobuild.test' test, the reported failures are mostly noise, that not only is annoying, but which might end up covering different real bugs or regressions. Thus we minimize such spurious failures, by ensuring the commands triggering them (most of them being "make distcheck" invocations) will be skipped when $MAKE suffers of the bug/limitation that triggers automake bug#7884. * tests/defs.in (useless_vpath_rebuild): New function. (yl_distcheck): Likewise. * tests/lex3.test, tests/subpkg-yacc.test, tests/yacc-basic.test, tests/yacc-cxx.test, tests/yacc-d-basic.test, tests/yacc-d-cxx.test, tests/yacc-dist-nobuild-subdir.test : Use them to avoid extra failures caused by automake bug#7884. Where possible, throw in some related simplifications.
Stefano Lattarini 3522166d 2012-02-06T19:43:34 tests: workaround for shells with broken 'set -e' * tests/defs (gmake, native, rst2html): Some versions of the BSD shell wrongly bail out when the 'errexit' shell flag is active and the left-hand command in a "&&" list fails, if that list is the *last* command of a "for" or "while" loop. Work around this issue. * tests/lex3.test: Likewise. * tests/check12.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/lex-noyywrap.test: Likewise. * tests/parallel-tests2.test: Likewise. * tests/lex-lib-external.test: Likewise. * tests/check-no-test-driver.test: Likewise. * tests/test-metadata-recheck.test: Likewise. * tests/parallel-tests-dry-run-1.test: Likewise. * tests/parallel-tests-dry-run-2.test: Likewise. * tests/parallel-tests-unreadable.test: Likewise. * tests/test-driver-custom-no-extra-driver.test: Likewise. Problem revealed by spurious testsuite failures on a NetBSD 5.1 system and an OpenBSD 5.0 system.
Stefano Lattarini 0ea1177e 2011-07-16T00:19:56 tests: fix typos, grammaros and other blunders in comments
Stefano Lattarini 7a7fc565 2011-05-23T21:53:44 testsuite: require C compiler explicitly in tests needing it The list of the test scripts which needed a C compiler but failed to require it explicitly has been found by running: $ am_explicit_skips=yes CC=false make check and looking for tests that reported FAIL instead of SKIP. After the present change, all those previously failing tests either pass or get correctly skipped. * tests/aclocal4.test ($required): Add `cc'. * tests/ansi.test: Likewise. * tests/ansi10.test: Likewise. * tests/ansi3.test: Likewise. * tests/ansi3b.test: Likewise. * tests/ansi5.test: Likewise. * tests/ansi6.test: Likewise. * tests/ansi7.test: Likewise. * tests/ansi9.test: Likewise. * tests/backcompat6.test: Likewise. * tests/canon7.test: Likewise. * tests/check5.test: Likewise. * tests/check7.test: Likewise. * tests/check8.test: Likewise. * tests/cond4.test: Likewise. * tests/cond11.test: Likewise. * tests/cond16.test: Likewise. * tests/cond18.test: Likewise. * tests/cond19.test: Likewise. * tests/cond22.test: Likewise. * tests/cond30.test: Likewise. * tests/cond31.test: Likewise. * tests/cond32.test: Likewise. * tests/cond34.test: Likewise. * tests/cond35.test: Likewise. * tests/cond39.test: Likewise. * tests/condd.test: Likewise. * tests/cygnus-dependency-tracking.test: Likewise. * tests/depcomp2.test: Likewise. * tests/depcomp6.test: Likewise. * tests/depcomp7.test: Likewise. * tests/depcomp8a.test: Likewise. * tests/depcomp8b.test: Likewise. * tests/depdist.test: Likewise. * tests/depend2.test: Likewise. * tests/depend5.test: Likewise. * tests/distcleancheck.test: Likewise. * tests/distname.test: Likewise. * tests/exeext.test: Likewise. * tests/exeext4.test: Likewise. * tests/extradep.test: Likewise. * tests/extradep2.test: Likewise. * tests/gnits2.test: Likewise. * tests/gnits3.test: Likewise. * tests/instdir-ltlib.test: Likewise. * tests/instdir-prog.test: Likewise. * tests/instfail.test: Likewise. * tests/instfail-libtool.test: Likewise. * tests/lex3.test: Likewise. * tests/lex5.test: Likewise. * tests/lexvpath.test: Likewise. * tests/lex-subobj-nodep.test: Likewise. * tests/lflags.test: Likewise. * tests/libobj-basic.test: Likewise. * tests/libobj2.test: Likewise. * tests/libobj7.test: Likewise. * tests/libobj10.test: Likewise. * tests/libobj16a.test: Likewise. * tests/libobj16b.test: Likewise. * tests/libobj17.test: Likewise. * tests/libobj19.test: Likewise. * tests/libtool2.test: Likewise. * tests/libtool3.test: Likewise. * tests/libtool7.test: Likewise. * tests/libtool9.test: Likewise. * tests/libtoo10.test: Likewise. * tests/libtoo11.test: Likewise. * tests/ltcond.test: Likewise. * tests/ltcond2.test: Likewise. * tests/ltconv.test: Likewise. * tests/ltinit.test: Likewise. * tests/ltlibsrc.test: Likewise. * tests/ltorder.test: Likewise. * tests/nobase.test: Likewise. * tests/nobase-libtool.test: Likewise. * tests/mmodely.test: Likewise. * tests/parallel-tests5.test: Likewise. * tests/parallel-tests-suffix-prog.test: Likewise. * tests/parallel-tests-ext-driver-prog.test: Likewise. * tests/posixsubst-ldadd.test: Likewise. * tests/posixsubst-libraries.test: Likewise. * tests/posixsubst-ltlibraries.test: Likewise. * tests/posixsubst-programs.test: Likewise. * tests/posixsubst-sources.test: Likewise. * tests/pr87.test: Likewise. * tests/pr204.test: Likewise. * tests/pr224.test: Likewise. * tests/pr300-lib.test: Likewise. * tests/pr300-ltlib.test: Likewise. * tests/pr300-prog.test: Likewise. * tests/pr401.test: Likewise. * tests/pr401b.test: Likewise. * tests/pr401c.test: Likewise. * tests/remake-gnulib-add-acsubst.test: Likewise. * tests/remake-gnulib-add-header.test: Likewise. * tests/regex.test: Likewise. * tests/repeated-options.test: Likewise. * tests/silent.test: Likewise. * tests/silent3.test: Likewise. * tests/silent9.test: Likewise. * tests/silent-lex-generic.test: Likewise. * tests/silent-many-generic.test: Likewise. * tests/silent-yacc-generic.test: Likewise. * tests/specflg7.test: Likewise. * tests/specflg9.test: Likewise. * tests/specflg10.test: Likewise. * tests/stdinc.test: Likewise. * tests/strip.test: Likewise. * tests/strip2.test: Likewise. * tests/strip3.test: Likewise. * tests/subdirbuiltsources.test: Likewise. * tests/subobj3.test: Likewise. * tests/subobj6.test: Likewise. * tests/subobj11a.test: Likewise. * tests/subpkg.test: Likewise. * tests/subst2.test: Likewise. * tests/subst3.test: Likewise. * tests/substref.test: Likewise. * tests/substre2.test: Likewise. * tests/suffix5.test: Likewise. * tests/suffix8.test: Likewise. * tests/suffix10.test: Likewise. * tests/suffix11.test: Likewise. * tests/suffix12.test: Likewise. * tests/suffix13.test: Likewise. * tests/target-cflags.test: Likewise. * tests/transform.test: Likewise. * tests/transform2.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/yacc-d-basic.test: Likewise. * tests/yacc-clean.test: Likewise. * tests/yacc-dist-nobuild.test: Likewise. * tests/yacc-nodist.test: Likewise. * tests/yaccvpath.test: Likewise. * tests/yacc-d-vpath.test: Likewise. * tests/yacc4.test: Likewise. * tests/yacc7.test: Likewise. * tests/yacc8.test: Likewise. * tests/yaccdry.test: Likewise. * tests/yflags-cmdline-override.test: Likewise. * tests/yflags-force-override.test: Likewise. * tests/python-virtualenv.test: Likewise. Also, improve skip messages. * tests/subobj5.test ($required): Add `cc'. (Makefile.am): Set `AUTOMAKE_OPTIONS' to `subdir-objects', and add new checking rules `test-build' and `test-distdir'. Extend the test by building and examining the distdir, the program, and the object files. * tests/postproc.test ($required): Add `cc'. Avoid the explicit `|| Exit $?' after call to configure, which is now either redundant (e.g., when `am_explicit_skips' is unset), or counter-productive (e.g., when `am_explicit_skips' is set to "yes"). * tests/pr243.test: Likewise. * tests/pr266.test: Likewise. * tests/pr220.test: Simplify so that it doesn't require a C compiler anymore. * tests/subdir5.test: Likewise. * tests/subdir8.test: Likewise. * tests/lflags.test: Likewise. * tests/yflags.test: Likewise. * tests/yflags-force-conditional.test: Likewise. * tests/lflags2.test: Simplify so that it doesn't require a C++ compiler anymore. * tests/yflags2.test: Likewise. * tests/autohdrdry.test (configure.in): Remove unneeded call to `AC_PROG_CC'. * tests/pr287.test: Likewise. * tests/check6.test: Likewise. * tests/cond21.test: Likewise, plus some cosmetic adjustments. * tests/upc.test: Skip if configure fails with status `77'. * tests/upc3.test: Likewise. * tests/vala4.test: Likewise. * tests/nostdinc.test: Likewise. Also, make grepping checks on `Makefile.in'. Update heading comments. * tests/compile5.test: When we must skip, skip explicitly, and with a meaningful message. * tests/instspc-tests.sh: When running in "test-build" or "test-install" mode (as determined by the value of variable `$instspc_action'), require `cc'. Adjust comments. * tests/depmod-tests.sh: Likewise.
Stefano Lattarini e9e5d4ac 2011-05-15T16:33:01 tests: avoid spurious failures in cross-compile mode * tests/depcomp2.test: Ensure verbose printing of captured stderr from configure. * tests/ansi3.test ($required): Add 'native', as the ansi2knr functionality is not meant to work with a cross-compiler. * tests/ansi3b.test: Likewise. * tests/ansi5.test: Likewise. * tests/ansi6.test: Likewise. * tests/ansi7.test: Likewise. * tests/ansi8.test: Likewise. * tests/ansi10.test: Likewise. * tests/subobj3.test: Likewise. * tests/check8.test ($required): Add 'native', as this test is not meant to work with a cross-compiler. * tests/gnits2.test: Likewise. * tests/ltconv.test: Likewise. * tests/ltcond2.test: Likewise. * tests/parallel-tests5.test: Likewise. * tests/specflg7.test: Likewise. * tests/specflg8.test: Likewise. * tests/check5.test: Likewise. Also, ensure verbose printing of captured make output, and thrown in few cosmetic and consistency improvements. * tests/ltinit.test: Be laxer in grepping configure output, to avoid spurious failures on systems which lack POSIX dynamic linking (e.g., MinGW), or when cross-compiling for such systems. * tests/ansi9.test: Skip parts of the test that would require a native compiler. * tests/backcompat6.test: Likewise. * tests/depcomp8a.test: Likewise. * tests/pr401.test: Likewise. * tests/pr401b.test: Likewise. * tests/pr401c.test: Likewise. * tests/target-cflags.test: Likewise. * tests/lex3.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/autohdr4.test: Likewise. Also, extend the test to ensure more coverage in cross-compile mode. * tests/canon7.test: Likewise. * tests/check9.test: Removed, split into two new tests ... * tests/check-subst-prog.test: ... this one, which requires a native C compiler ... * tests/check-subst.test: ... and this one, which doesn't require any compiler. * tests/parallel-tests4.test: Removed, split into two new tests ... * tests/parallel-tests-suffix-prog.test: ... this one, which requires a native C compiler ... * tests/parallel-tests-suffix.test: ... and this one, which doesn't require any compiler. * tests/parallel-tests7.test: Removed, split into two new tests ... * tests/parallel-tests-ext-driver-prog.test: ... this one, which requires a native C compiler ... * tests/parallel-tests-ext-driver.test: ... and this one, which doesn't require any compiler. * tests/Makefile.am (TESTS): Update.
Stefano Lattarini d986a800 2011-04-15T18:12:05 lex/yacc tests: remove redundant $distdir definition * tests/lex3.test ($distdir): Remove definition, that's already done in `tests/defs'. * tests/lexvpath.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/yacc-cxx.test: Likewise. * tests/yacc-d-basic.test: Likewise. * tests/yacc-d-cxx.test: Likewise. * tests/yacc-d-vpath.test: Likewise. * tests/yacc-dist-nobuild-subdir.test: Likewise. * tests/yacc-dist-nobuild.test: Likewise. * tests/yacc-mix-c-cxx.test: Likewise. * tests/yaccvpath.test: Likewise.
Stefano Lattarini 531cc871 2011-04-12T17:25:42 Merge branch 'maint' (with edits) test defs: define default $distdir (help reducing duplication) * tests/defs ($distdir): New variable, might be used in testcases checking distribution-related features. * tests/pr9.test: Use it. * tests/subdir9.test: Likewise. * tests/lex3.test: Likewise. * tests/lexvpath.test: Likewise. * tests/remake-moved-m4-file.test: Likewise. * tests/remake-renamed-m4-file.test: Likewise. * tests/remake-renamed-m4-macro-and-file.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/yacc-d-basic.test: Likewise. * tests/yacc-d-vpath.test: Likewise. * tests/yacc-dist-nobuild.test: Likewise. * tests/vtexi3.test: Add comment explaining why we redefine $distdir in this test.
Stefano Lattarini 0f4005f0 2011-04-10T11:13:54 cosmetics: fix typos and wording in some yacc tests * tests/yacc-cxx.test (foo.cc): Clarify comment about the content of this file being valid C++ but invalid C. (parse1.yy): Likewise. Also, remove redundant parentheses in a `return' statement. * tests/yacc-d-cxx.test (write_parse): Clarify comment about the content of the generated files being valid C++ but invalid C. (write_main): Likewise. * tests/yacc-basic.test: Remove redundant parentheses in a `return' statement. * tests/yacc-d-vpath.test: Adjust spacing around curly brackets. * tests/yaccvpath.test: Likewise. * tests/yaccdry.test: Likewise. * tests/yacc8.test: Likewise. * tests/yacc4.test: Likewise. Suggested by Ralf Wildenhues.
Stefano Lattarini 06efe9c4 2011-01-21T17:47:42 yacc: extension of headers modelled after extension of sources With this change, if '-d' is in *YFLAGS, a yacc input file named foo.y++ will cause a foo.h++ header to be generated, instead of a foo.h header. Similarly for foo.ypp, foo.yxx and foo.yy. This way, the name of the files generated by an automake-created `ylwrap' invocation should be consistent with those generated by a `bison -o' call. Related to automake bug#7648 and PR automake/491. * lib/am/yacc.am (am__yacc_c2h): New internal variable. (?GENERIC?%EXT%%DERIVED-EXT%, ?!GENERIC?%OBJ%): Get the name of the header dynamically at make runtime, so that its extension is modelled after the extension of the source. * automake.in (lang_yacc_target_hook): Adjust the calculation of `$header' accordingly. * tests/yacc-cxx.test: New test. * tests/yacc-d-cxx.test: Likewise. * tests/yacc-weirdnames.test: Likewise. * tests/yacc-basic.test: Update comments. * tests/yacc-d-basic.test: Likewise. * tests/yaccpp.test: Updated and extended. * tests/Makefile.am (TESTS): Update.
Stefano Lattarini a33290b3 2011-01-21T11:47:20 tests: cover yacc target-specific flags, and `-v' flag handling * tests/yacc-basic.test: Also try to build a parser having `-v' as target-specific flags. Add a couple of `ls -l' commands, for debugging. Update and extend comments. Escape literal dots in grep regular expressions.
Stefano Lattarini 06605440 2011-01-12T00:02:50 Merge branch 'yacc-work'
Stefano Lattarini 8b419dd7 2011-01-11T20:03:05 tests: do not force yacc-requiring tests to use bison * tests/defs.in: New required entry 'yacc'. Remove old required entry 'bison'. * tests/cond35.test ($required): Require yacc, not bison. * tests/cond36.test: Likewise. * tests/pr204.test: Likewise. * tests/silent-many-gcc.test: Likewise. * tests/silent-many-generic.test: Likewise. * tests/silent-yacc-gcc.test: Likewise. * tests/silent-yacc-generic.test: Likewise. * tests/subpkg.test: Likewise. * tests/suffix10.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/yacc-clean.test: Likewise. * tests/yacc-d-basic.test: Likewise. * tests/yacc-d-vpath.test: Likewise. * tests/yacc-dist-nobuild.test: Likewise. * tests/yacc-nodist.test: Likewise. * tests/yacc4.test: Likewise. * tests/yacc6.test: Likewise. * tests/yacc7.test: Likewise. * tests/yacc8.test: Likewise. * tests/yaccdry.test: Likewise. * tests/yaccvpath.test: Likewise.
Stefano Lattarini 79103003 2011-01-08T19:40:04 tests: enable 'errexit' shell flag by default. * tests/defs: Enable `errexit' shell flag (near the end). Removed redundant comment about the enabling of shell traces. * tests/README (Writing test cases): Update, and use nicer formatting in a couple of places. * All tests: Adjusted by removing now-redundant calls to 'set -e'.
Stefano Lattarini c5b255ba 2011-01-05T16:07:56 yacc: extend and improve tests * tests/yacc-basic.test: Also check that the intermediate C file is mentioned in the generated Makefile.in, and that it is created by the first make invocation. * tests/yacc3.test: Test removed, superseded by ... * tests/yacc-d-basic.test: ... this new test. * tests/yacc2.test: Add reference to that new test in the heading comments. * tests/yacc-d-vpath.test: New test. * tests/yaccvpath.test: Updated heading comments. Do not require gcc anymore, as any working C compiler should be enough. Remove redundant comments. * tests/yacc-nodist.test: New test. * tests/yacc-dist-nobuild.test: New test. * tests/Makefile.am (TESTS): Update.
Stefano Lattarini d4dcf503 2010-05-07T15:07:37 Extend, fix and improve tests on Lex and Yacc support. * tests/lexcpp.test: New test script, on support for Lex + C++. * tests/lexvpath.test: New test script, test build and rebuild rules for lexers in VPATH setup. * tests/yacc-basic.test: New test script, run simple "semantic" checks on basic Yacc support (similarly to what lex3.test does for Lex support). * tests/lex.test: Don't create useless dummy source file joe.l. Remove extra blank lines. * tests/lex4.test: Add trailing `:' command. Do not create dummy useless lex source file. * tests/lex2.test: Likewise. Call automake with the `-a' option, so that it doesn't fail for the absence of `ylwrap' script. Make grepping of automake stderr stricter. * tests/yacc7.test: Add trailing `:' command. Enable `errexit' shell flag earlier (just after having sourced ./defs). * tests/yacc4.test: Likewise. Also ... (configure.in): Use pre-populated skeleton set up by ./defs, instead of writing one from scratch. Other minor cosmetic changes. * tests/yacc5.test: Likewise. * tests/yaccvpath.test: Likewise. Also ... ($distdir): New variable. Use it throughout. * tests/lex5.test: Likewise. * tests/lex3.test: Likewise. Check the distdir, rather than grepping the distribution tarball. Extend the test on the created binary, and be sure to avoid hangs. Add some comments. * tests/yacc.test: Use stricter grepping. Add trailing `:'. * tests/yacc6.test: Likewise. * tests/yacc3.test: Likewise. Do not create the unused file `Makefile.sed'. Remove useless rules from Makefile.am. Other minor cosmetic changes. * tests/yacc2.test: Make grepping of generated `Makefile.in' and of automake error messages stricter. Do not redirect output of grep to /dev/null. Move call to aclocal earlier. Reduce the number of empty blank lines. Fix a typo in comments. * tests/yacc8.test: Fixed bugs that reduced the completeness of the tests. Added trailing `:' command. (configure.in): Use pre-populated skeleton set up by ./defs, instead of writing one from scratch. * tests/yaccpp.test: Test also extensions `.y++', `.ypp', and `.yxx', rather than only `.yy'. * tests/Makefile.am (TESTS): Update.