syntax-checks.mk


Log

Author Commit Date CI Message
Stefano Lattarini 1efb88ca 2012-11-16T14:50:02 Merge branch 'maint' * maint: maintcheck: avoid failures, sync with 'ng/master' more maintcheck: remove 'sc_perl_syntax' sync: update files from upstream with "make fetch" maint: get rid of $perllibdir environment variable hack configure: respect the '-q' option better cosmetics: de-tabify configure.ac Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini b1e58545 2012-11-16T14:17:01 maintcheck: avoid failures, sync with 'ng/master' more * syntax-checks.mk (sc_diff_aclocal_in_aclocal, sc_diff_automake_in_automake): Rename ... (sc_diff_aclocal, sc_diff_automake): ... respectively to these, rewrite to use static pattern rules and 'diff -u' instead of bare 'diff'. This makes the rules more robust in the face of edits to 'automake.in' and 'aclocal.in', and get them in sync with the corresponding checks in the 'ng/master' branch. (syntax_check_rules): Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini b1a0ec53 2012-11-16T14:07:40 maintcheck: remove 'sc_perl_syntax' It is quite useless, since a "make bootstrap" or "make check" would immediately catch a breakage in the 'aclocal' or 'automake' scripts anyway. In addition, the recent removal of the 'perllibdir' environment variable hack has broken this check. * syntax-checks.mk (sc_perl_syntax): Remove. (syntax_check_rules): No longer list it. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 57770a2c 2012-10-27T18:31:21 tests: get rid of ./defs, it's no longer used. * defs: Delete. * configure.ac (AC_CONFIG_LINKS): No longer link it. * t/ax/tap-setup.sh: Don't look for a file named 'defs' in the grandparent directory of the current test directory to decide whether we're running in the correct directory. * syntax-check.mk (xdefs): Remove '$(srcdir)/defs'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 7f45725b 2012-10-27T18:26:19 maintcheck: fix the name of a check * (sc_tests_Exit_not_exit): Rename ... (sc_tests_exit_not_Exit): ... like this, which is more faithful to what the check actually does. Adjust a grammaro in comments while at it. (syntax_check_rules): Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini b6dba4cf 2012-10-27T18:08:06 maintcheck: guard against uses of ./defs in tests Now, 'test-init.sh' should be used instead. * (sc_tests_no_source_defs): New maintainer check. (syntax_check_rules): Add it. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 94b639da 2012-10-26T15:00:39 maintcheck: remove an obsolescent check * syntax-checks.mk (sc_test_names): Remove this check, which verified that no test name contained an m4/m4sugar builtin or macro name. Since most tests use their own name as the first argument to AC_INIT, doing that would have tickled a bug in Autoconf 2.62; but the bug was fixed in Autoconf 2.63 already; and we are going to soon require Autoconf 2.65 anyway (in automake 1.13), so this check has become more annoying than useful. (syntax_check_rules): Don't list the removed check. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 106428fe 2012-07-26T18:16:47 Merge branch 'maint' * maint: (38 commits) maintcheck: fixup list of files in $(xdefs) tests: never source test-defs.sh directly, source test-lib.sh instead runtest: sanitize test environment tests: remove an obsolescent self test tests: "am_using_tap=yes" -> "am_test_protocol=tap" tests: protect test libs against multiple inclusion configure: testsuite shell can return early from "dot-sourced" files tests: move sanitization and "Bournification" in the generic test lib tests: source test defs in the generic test lib test defs: no need to re-add $srcdir/t/ax to $PATH tests: split test libs into "generic" and "automake-specific" test setup: move actual calling of testsuite setup in ./defs test setup: merge definitions of function for simple tests test init: refactor: new function 'am_test_setup' test init: refactor: move displaying of debugging info later test init: refactor: new function 'am_setup_testdir' test init: refactor: new function 'am_set_exit_traps' configure: testsuite shell set exit traps in shell functions test init: refactor: new function 'am_exit_trap' test init: refactor: new function 'process_requirements' ... Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini c3ab278a 2012-07-26T14:16:42 maintcheck: fixup list of files in $(xdefs) syntax-checks.mk (xdefs): Adjust to recent changes: add 't/ax/test-lib.sh' and 't/ax/test-lib.sh', remove the now-deleted 't/ax/test-init.sh' Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini e82c9156 2012-07-26T10:35:09 tests: "am_using_tap=yes" -> "am_test_protocol=tap" And similarly, "am_using_tap=no" -> "am_test_protocol=none". The new '$am_test_protocol' name is clearer, and will allow the easy addition of further test protocols in the future. This is not truly relevant for automake, but we are trying to make some parts of our testsuite framework as general as possible, in view of a future move to a more generic project like Gnulib. * Makefile.am, t/ax/am-test-lib.sh, t/ax/test-defs.in, t/ax/test-lib.sh, t/self-check-env-sanitize.tap, t/self-check-tap.sh: Adjust. * syntax-checks.mk (sc_tests_obsolete_variables): Add 'am_using_tap' to the list of obsolete variables to check against. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini ecbceb3e 2012-07-25T18:14:23 test defs: move in 't/ax/test-defs.sh' We can do so with minimal churn, now that the early setup of $PATH in both 'runtest' and AM_TESTS_ENVIRONMENT allow the '.' built-in to find to-be-sourced shell scripts in 't/ax' automatically, both in in-tree and VPATH builds. With this change, we take another step forward a more rational and "segregated" organization of our testsuite framework. * defs-static.in: Rename ... * t/ax/test-defs.in: ... like this, and adjust. * Makefile.am, syntax-checks.mk, t/README, gen-testsuite-part, t/tests-init.sh, t/ax/tap-setup.sh, t/tap-summary.sh, .gitignore, t/testsuite-summary-color.sh, t/testsuite-summary-count.sh, t/self-check-tap.sh, defs: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini d7d983b0 2012-07-02T17:24:24 tests: tests for stuff in contrib goes in 'contrib/t' * t/help-multilib.sh: Move ... * contrib/t/help-multilib.sh: .. here. Remove a now-obsolete "FIXME" comment. * t/multlib.sh: Move ... * contrib/t/multilib.sh: .. here. Remove a now-obsolete "FIXME" comment. * t/parallel-test2.sh: Move ... * contrib/t/parallel-tests-html.sh: .. here. Remove a now-obsolete "FIXME" comment. * contrib/t/local.am: New, basically defining the list of tests for stuff in 'contrib/'. * t/list-of-tests.mk, Makefile.am: Adjust. * .gitignore: Update. * syntax-checks.mk (xtests): Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini ca9b4d33 2012-07-01T10:14:23 Merge branch 'maint' * maint: parallel-tests: silence an overly verbose recipe tests: fix some uses of 'Exit', where 'exit' should now be used instead maintcheck: test scripts should be executable, check for that
Stefano Lattarini dc5aff42 2012-06-30T23:26:17 maintcheck: test scripts should be executable, check for that * syntax-checks.mk (sc_tests_executable): Here, in this new check. (syntax_check_rules): Add it. * Makefile.am (dist-hook): Drop, no need to make test cases executable anymore. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini b21d6869 2012-06-28T13:27:49 Merge branch 'maint' * maint: tests: simpler workaround for shells losing the exit status in exit trap + Extra non-trivial edits: * Several tests: Adjusted to use 'exit' rather than 'Exit'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini c2a52bf0 2012-06-24T10:36:15 tests: simpler workaround for shells losing the exit status in exit trap Now that we can assume our tests are run by a decent POSIX shell, we can simplify our workaround aimed at having the exit status propagated correctly to the code in the exit trap. Unfortunately, we cannot dispense with such a workaround altogether, because it's still required by some shells we need to support (at least Solaris 10 /bin/ksh and /usr/xpg4/bin/sh). For more information about the need of that workaround, see the entry about 'trap' in the section "Limitations of Shell Builtins" in the Autoconf manual: <http://www.gnu.org/software/autoconf/manual/autoconf.html#trap> The new workaround has been tested successfully with the following shells: - Bash 4.1 - Bash 3.2 - Bash 3.0 - Bash 2.05b - dash 0.5.5.1 - dash 0.5.2 - AT&T Ksh 93u (from official Debian package) - MirBSD Korn Shell 40.2 (from official Debian package) - Solaris 9, 10 and 11 /bin/ksh - Solaris 9, 10 and 11 /usr/xpg4/bin/sh - NetBSD 5.1 /bin/sh - NetBSD 5.1 /bin/ksh * t/ax/test-init.sh (Exit): Rename ... (_am_exit): ... like this. (exit): New alias for '_am_exit'. We cannot simply redefine 'exit' as a shell function, because some shells (dash 0.5.5.1, Solaris 10 /bin/ksh and /usr/xpg4/bin/sh) do not allow it. (_am_exit, trap): Add extra escaping for 'exit' calls, to ensure we really invoke the 'exit' builtin and not our alias with the same name. * configure.ac: Check that the shell selected to run our testsuite supports aliases named like shell builtins. * t/REAMDE: Adjust. * All tests: Adjust, by simply using 'exit' instead of 'Exit'. * t/self-check-explicit-skips.sh: Adjust: the first usage of 'exit' after it has been redefined as an alias must be on a new line w.r.t. that where the alias is defined, in order for the redefinition to be honored. * syntax-checks.mk (sc_tests_Exit_not_exit): Delete. (sc_tests_exit_not_Exit): New. (syntax_check_rules): Adjust. (sc_tests_automake_fails): Simplify the recipe a little. * Several tests: Remove now useless spurious quoting once required to placate the 'sc_tests_Exit_not_exit' maintainer check. * gen-testsuite-part: Likewise. Also, avoid uses of 'Exit' in the generated scripts. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini edbcd8f1 2012-06-23T00:16:26 Merge branch 'maint' * maint: tests: avoid one last `...` command substitution in 'test-init.sh' maintcheck: guard against `...` for command substitution in test cases tests: more uses of $(...) over `...` for command substitution cosmetics: quote `like this', not 'like this', in a couple of tests readme: clarify/extend few entries in 't/README' readme: better separation of entries in 't/README' readme: subsections "Do" and "Do not" in 't/README' merged tests: new requirement 'grep-nonprint' cosmetics: fix description of an expected error message in a test tests: assume automake quotes 'like this', not `like this' Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini e5343765 2012-06-23T00:06:10 maintcheck: guard against `...` for command substitution in test cases But still allow them in configure.ac, Makefile.am and shell scripts created or used inside test cases itself, because Autoconf (as of version 2.69) does not yet ensure that $CONFIG_SHELL will be set to a proper POSIX shell. * syntax-checks.mk (sc_tests_command_subst): New check. (syntax-check_rules): Add it. * t/tap-global-log.sh: Minimal tweakings to avoid triggering the new maintainer check. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 3b83966e 2012-06-22T18:55:01 Merge branch 'maint' * maint: tests: prefer using 'is_newest' over 'ls -t' hacks tests: implement is_newest as an auxiliary script, not shell function tests: fix some spurious failures in VPATH setup tests: work in VPATH setup again
Stefano Lattarini 13dd512d 2012-06-22T18:15:21 tests: prefer using 'is_newest' over 'ls -t' hacks To verify that a file 'new' is newer than the file 'old', it's much cleaner to use "is_newest new old" rather than the more clumsy "ls -t". Adjust several of our tests accordingly. * syntax-checks.mk (sc_tests_ls_t): New check, guard against uses of "ls -t" and similar. (syntax_check_rules): Add it. * t/maken.sh: Adjust. * t/autohdr4.sh: Likewise. * t/extradep2.sh: Likewise. * t/lex-depend-cxx.sh: Likewise. * t/extradep.sh: Likewise. * t/yacc-depend2.sh: Likewise. * t/yacc-pr204.sh: Likewise. * t/lex-pr204.sh: Likewise. * t/yacc8.sh: Likewise. * t/acloca13.sh: Likewise. * t/lex-depend.sh: Likewise, and enhance. * t/acloca14.sh: Likewise. * t/aclocal7.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 062aeb24 2012-06-22T14:52:21 Merge branch 'maint' * maint: tests: automatic re-execution works for non-POSIX shells too tests: use more POSIX shell features our test scripts + Extra non-trivial edits: * t/ax/test-init.sh: Apply the diffs between past versions of 'defs' in maint and in master; i.e., remove handling of $required entries 'texi2dvi-o' and 'makeinfo-html', and adjust to the fact that the parallel testsuite harness is now the default. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 3a1a8c6d 2012-06-22T11:40:39 tests: automatic re-execution works for non-POSIX shells too Some inferior shells are too greedy in parsing their input. If a non-POSIX Bourne shell (like Solaris 10 /bin/sh) was used to launch one of our test scripts, it would fail unconditionally, because it unexpectedly saw some (by it) unsupported constructs, notwithstanding such constructs being placed *after* the code implementing automatic test re-execution with a better shell. In conclusion, the shell bailed out like this: $ /bin/sh t/ar.sh $ t/ar.sh: syntax error at line 257: `is_newest_files=$' unexpected By moving all the potentially problematic code in a separate file, to be sourced only after the code for automatic re-execution with a better shell, we ensure that inferior shell cannot see such code by mistake. * defs: All code after automatic shell re-execution moved out ... * t/ax/test-init.sh: ... to this new file. * syntax-checks.mk (xdefs): Add it. * Makefile.am (dist_check_DATA): Add it. Also move in 'defs' from a less explicit 'check_DATA' declaration. (nodist_check_DATA): Move in 'defs-static' from a less explicit 'check_DATA' declaration. (check_DATA): Remove. * t/self-check-sanity.sh: Remove, it was actually too hacky and brittle, sanity-checking situations we don0t actually care about. * t/list-of-tests.mk: Adjust. * t/self-check-explicit-skips.sh: Adjust, and fix a botched heading comments while we are at it. * t/self-check-reexec.tap: Adjust. * t/self-check-cleanup.tap: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 9c22243a 2012-06-20T13:49:18 maintcheck: guard against obsolete $required entries * syntax-check.mk: Add rules guarding against the use of the obsolete test requirements 'texi2dvi-o' and 'makeinfo-html'. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 2ef0a2d3 2012-06-11T21:39:46 Merge branch 'maint' * maint: maintcheck: fix failures, both real and spurious subdir tests: avoid an use of "make -j4", for portability tests: avoid failure due to libtool quirks in C++ demo test tests: fix spurious failures due to missing '$sleep' subdirs: unify rules for "cleaning" and "normal" recursive targets tests: add a "demo" test on C support tests: look for '.lo' rather than '.o' object when using Libtool with C++ cosmetics: few typofixes in older ChangeLogs, suggested by "codespell.py" maint: grammar fixes: s/all these/all of these/ subdir-objects: improve "make mostlyclean" efficiency and flexibility Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 511b6896 2012-06-11T21:21:32 maintcheck: fix failures, both real and spurious * syntax-checks.mk (sc_rm_minus_f): Whitelist the 't/subobj-clean*-pr10697.sh' tests. * t/subobj-clean-pr10697.sh: When redefining PATH, use '$PATH_SEPARATOR', not hard-coded ':'. * t/subobj-clean-lt-pr10697.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini e92bd2e7 2012-06-02T09:54:17 Merge branch 'maint' * maint: news: document deprecation of configure.in news: put planned backward compatibilities early sync: update files from upstream with "make fetch" maint: deprecate 'configure.in' as autoconf input maint: post-release minor version bump release: stable release 1.12.1 copyright: update copyright years in a couple of files tests: avoid spurious failures with Solaris 9 cscope program maintcheck: fix a spurious failure perf: beginning of a performance testsuite aclocal: declare function prototypes, do not use '&' in function calls news: support for configure.in will be dropped in future automake versions tests: fix botched heading comments in 'lex-clean-cxx.sh' [ng] maintcheck: some tweaks and fixlets help: fix a typo in the list of warning categories maint: version bump after beta release release: beta release 1.12.0b (will become 1.12.1) release: remove overly picky check Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 6bd70f6a 2012-05-25T18:49:07 [ng] maintcheck: some tweaks and fixlets * syntax-checks.mk (sc_no_brace_variable_expansions): Do not complain about ${MAKEVAR} usages in comments: they might be legitimate. This change is not strictly required for mainline automake, but will help in the Automake-NG branch. * sc_tests_here_document_format: Relax a bit, so that usages like "cout << "string" << endl;" in the test scripts (usages which can be used in here documents defining C++ sources) are not flagged as uses of bad delimiters for here documents. This change is not strictly required for mainline automake, but will help in the Automake-NG branch, and will anyway be more future proof w.r.t. possible future testsuite additions. (sc_tests_Exit_not_exit): Do not whitelist lines containing $PERL explicitly (that was only required for one test); instead ... * t/ext2.sh: ... use "exit (1)" instead of "exit 1" in the perl invocation of the guilty script. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 7b6129b9 2012-05-18T14:31:36 Merge branch 'maint' * maint: tests: use 'parallel-tests' Automake option by default doc: fix location of Automake's own test-suite.log file yacc tests: avoid a spurious failure with Sun C++ 5.9 self tests: cater for /bin/ksh symlinked to Zsh tests: fix spurious failures due to dpkg install-info Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 7b142a7b 2012-05-15T16:12:09 tests: use 'parallel-tests' Automake option by default This will help our transition from 'serial-tests' to 'parallel-tests' as the default test suite driver enabled by a TESTS assignment in the input Makefile.am. Note that that change of default will only take place in master, though. * defs: Pass the 'parallel-tests' option to the AM_INIT_AUTOMAKE invocation in the created 'configure.ac' stub, unless the variable 'am_serial_tests' is set to "yes". Don't pay attention anymore to the 'am_parallel_tests' variable, that's obsolete now. * defs-static.in: Warn if the 'am_serial_tests' variable is set in the environment; conversely, don't warn anymore about 'am_parallel_tests' being set in the environment. * Makefile.am (AM_TESTS_ENVIRONMENT): Nullify the 'am_serial_tests' variable instead of the now-obsolete 'am_parallel_tests' one. * syntax-checks.mk (sc_tests_obsolete_variables): Also warn against uses of 'am_parallel_tests', which is now deprecated in favor of 'am_serial_tests'. Similarly, if a use of 'parallel_tests' is seen, suggest using 'am_serial_tests' instead, not 'am_parallel_tests'. * gen-testsuite-part: Now that we use the 'parallel-tests' by default in our tests, we need to completely change the logic and semantics of generation of sibling tests for those tests that check the Automake generated testsuite harness itself. Do that, and give a complete explanation of the new logic and semantics in the relevant comments. * t/README: Update. * Lots of test cases: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 68075ce0 2012-05-05T21:48:49 require: autoconf >= 2.65; related simplifications The new support for Objective C++ (to be added in Automake 1.12.1) can be simplified if we assume Autoconf version 2.65 or later (2.65 being the version that introduced support for Objective C++). Since such an Autoconf version is two and half years old now (and will likely be almost three years old when Automake 1.13 gets released), requiring it is acceptable. This will also simplify testing and maintenance of Automake, because we'll need to test with fewer Autoconf version, and possibly rely on new Autoconf features. * NEWS (Version requirements): Automake 1.13 will require Autoconf 2.65 or later. * configure.ac ($required_autoconf_version): Bump to 2.65. * m4/init.m4 (AM_INIT_AUTOMAKE): Require Autoconf >= 2.65. Assume AC_PROG_OBJCXX is unconditionally defined. * m4/depout.m4: Adjust a comment about a nugget of defensive programming. * t/ext.sh: Assume that AC_PROG_OBJCXX is unconditionally defined, and that we are using Autoconf >= 2.65. Related simplifications. * t/objc-megademo.sh: Likewise. * t/objcxx-basic.sh: Likewise. * t/objcxx-deps.sh: Likewise. * t/objcxx-flags.sh: Likewise. * t/objcxx-minidemo.sh: Likewise. * t/nodep2.sh: Likewise. * t/backcompat3.sh: Assume AC_INIT accepts an URL argument. * t/depend5.sh: Adjust a comment. * syntax-checks.mk (sc_test_names): Delete this check as now useless: autoconf >= 2.65 (>= 2.63, actually) can handle arguments to AC_INIT that contain or are m4 builtins or predefined macros. (m4_builtin): Delete this now-useless variable as well, was used only by the check above. (syntax_check_rules): Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 67b86e08 2012-05-05T02:01:20 maintcheck: reduce code duplication, increase coverage * syntax-checks.mk: Move ... (sc_tests_plain_aclocal, sc_tests_plain_autoconf, sc_tests_plain_perl, sc_tests_plain_autoupdate, sc_tests_plain_automake, sc_tests_plain_make, sc_tests_plain_autoheader, sc_tests_plain_autoreconf, sc_tests_plain_autom4te): ... all these targets ... (sc_tests_plain_egrep_fgrep): ... and part of this target ... (sc_tests_plain_check_rules): ... into this variable, and reimplement their recipes ... ($(sc_tests_plain_check_rules)): ... with this static pattern rule. Enhance the coverage they offer a little since we are at it. (sc_m4_am_plain_egrep_fgrep): New rule, the part of the old 'sc_tests_plain_egrep_fgrep' rule that checked for use of 'fgrep' and 'egrep' in *.am and *.m4 fragments (rather than in test scripts). (syntax_check_rules): Update. * t/dist-formats.tap: Fix bad use of "make" instead of "$MAKE" revealed by the extra coverage. * t/cond5.sh, t/auxdir-autodetect.sh: Cosmetic changes to avoid spuriously triggering the maintainer checks due to the enhanced coverage. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 7a1eb9ff 2012-04-02T17:05:42 AM_PROG_MKDIR_P: deprecate, to be removed in Automake 1.13 Support for the obsolescent 'AM_PROG_MKDIR_P' macro (and its output variable '$(mkdir_p)') has already been deprecated in the documentation. It's now time to make its use actively emit warnings in the 'obsolete' category as well. * automake.in (scan_autoconf_traces): Warn about 'AM_PROG_MKDIR_P' obsolescent if that macro is seen. * m4/mkdirp.m4 (AM_PROG_MKDIR_P): Warn about its own obsolescence. * m4/init.m4: Require 'AC_PROG_MKDIR_P', not 'AM_PROG_MKDIR_P'. * t/mkdirp-deprecation.sh: New test. * t/list-of-tests.mk: Add it. * syntax-check.mk (sc_mkdir_p): Delete this check as obsolete. (syntax_check_rules): Remove it. * t/gettext-macros.sh: Ensure the gettext-requiring tests will call aclocal and automake with the 'obsolete' warnings disabled, since even recent versions of gettext used the now-deprecated 'AM_PROG_MKDIR_P' m4 macro. * NEWS: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 41f418b0 2012-04-18T15:08:37 maintainer-check: fix definition of $(ams) again * syntax-checks.mk (ams): The previous change 'v1.11b-36-g127adfb' solved one problem in the definition of this variable, but also caused it contain the names of all the left-behind 't/*.dir' temporary test directories. Fix that. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 127adfb5 2012-04-18T13:40:59 maintainer-check: do not hang * syntax-checks.mk (ams): The definition of this variable was invoking the 'find' utility in an incorrect way, which resulted into the variable being empty, thus reducing coverage in some maintainer check and making other hang. Fix this. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 8036e5a1 2012-04-11T21:01:39 maintcheck: avoid yet more spurious failures (2) Some maintainer checks were too greedy in processing 'Makefile.am' files, looking for them even in temporary directories left behind by the test cases, thus causing occasional spurious failures. * syntax-checks.mk (ams): Ignore 'Makefile.am' files in the temporary test directories. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini ee6eb9fa 2012-04-11T19:18:21 maintcheck: fix spurious failures * syntax-check.mk (sc_mkinstalldirs): Now the 'mkinstalldirs' is listed in the top-level 'Makefile.am', not in 'lib/Makefile.am'; adjust the "whitelist" accordingly. (sc_ensure_testsuite_has_run): The 'test-suite.log' file created by "make check" is now placed in the top-level directory, not in the 't/' subdirectory. Adjust by using '$(TEST_SUITE_LOG)' instead of an hand-crafted path for the 'test-suite.log' file. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 8e02441b 2012-04-06T15:20:54 maint: no more make recursion in Automake's build system We finally merge testsuite-related part of the Automake build system with the top-level one. See also yesterday's commit 'v1.11-2124-ga4b0f4b', "maint: remove most recursion in automake's own build system". * t/gen-testsuite-part: Move ... * gen-testsuite-part: ... here, with required adjustments. * t/defs-static.in: Move ... * defs-static.in: ... here, with required adjustments. In particular ... ($testsrcdir, $testbuilddir): Removed. ($top_testsrcdir): Renamed ... ($am_top_srcdir): ... to this. ($top_testbuilddir): Renamed ... ($am_top_builddir): ... to this. * t/defs: Move ... * defs: ... here, and adjust as required. * t/Makefile.am: Merge ... * Makefile.am: ... in here, with related adjustments and simplifications. * bootstrap: Adjust as required. * syntax-checks.mk: Likewise. * .gitignore: Likewise. * t/ax/tap-setup.sh: Likewise. * t/get-sysconf.sh: Likewise. * t/help-multilib.sh: Likewise. * t/multlib.sh: Likewise. * t/parallel-tests2.sh: Likewise. * t/self-check-cleanup.tap: Likewise. * t/self-check-exit.tap: Likewise. * t/self-check-dir.tap: Likewise. * t/self-check-explicit-skips.sh: Likewise. * t/self-check-reexec.tap: Likewise. * t/self-check-sanity.sh: Likewise. * t/yacc-d-cxx.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 8a5096d1 2012-04-06T13:12:25 tests: rename 'tests/' => 't/', '*.test' => '*.sh' When we (soon) convert the Automake testsuite to a non-recursive make setup, we'll have to fix the entries of $(TESTS) to be prepended with the subdirectory they are in; this will increase the length of $(TESTS), and thus increase the possibility of exceeding the command-line length limits on some systems (most notably, MinGW/MSYS). See automake bug#7868 for more information. Thus we rename the 'tests/' subdirectory to 't/', and each 'x.test' script in there to 'x.sh'; this way, the $(TESTS) entry 'foo.test' will become 't/foo.sh', which have the same number of characters. * tests/: Rename ... * t/: ... to this. * t/*.test: Rename ... * t/*.sh: ... to this. * t/.gitignore: Removed as obsolete. * t/defs: Adjust. * t/gen-testsuite-part: Likewise. * t/list-of-tests.mk: Likewise. * t/ccnoco.sh: Likewise. * t/ccnoco3.sh: Likewise. * t/self-check-cleanup.tap: Likewise. * t/self-check-dir.tap: Likewise. * t/self-check-me.tap: Likewise. * t/self-check-reexec.tap: Likewise. * README: Likewise. * bootstrap: Likewise * configure.ac: Likewise. * Makefile.am: Likewise. * .gitignore: Likewise. * syntax-check.mk: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 23f0543e 2012-04-05T21:20:29 tests: move most helper scripts and files into the 'ax' subdirectory * tests/defs-static.in ($am_testauxdir): New variable. * tests/testsuite-summary-checks.sh: Moved ... * tests/ax/testsuite-summary-checks.sh: ... here. * tests/trivial-test-driver: Moved ... * tests/ax/trivial-test-driver: ... here. * tests/tap-summary-aux.sh: Moved ... * tests/ax/tap-summary-aux.sh: ... here. * tests/distcheck-hook-m4.am: Moved ... * tests/ax/distcheck-hook-m4.am: ... here. * tests/prove-runner: Moved ... * tests/ax/prove-runner: ... here. * tests/depcomp.sh: Moved ... * tests/ax/depcomp.sh: ... here. * tests/tap-setup.sh: Moved ... * tests/ax/tap-setup.sh: ... here. * tests/tap-functions.sh: Moved ... * tests/ax/tap-functions.sh: ... here. * tests/plain-functions.sh: Moved ... * tests/ax/plain-functions.sh: ... here. * tests/extract-testsuite-summary: Moved ... * tests/ax/extract-testsuite-summary.pl: .. . here. * tests/gen-testsuite-part: Adjusted accordingly. * tests/Makefile.am: Likewise. * tests/defs: Likewise. * syntax-check.mk: Likewise. * Several tests: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 57d09886 2012-03-02T22:50:21 maintcheck: fix few spurious failures * syntax-checks.mk: Fix some spurious failures by tightening and/or tweaking few checks so that some false positives end up whitelisted.
Stefano Lattarini c4f2b64c 2012-02-23T22:06:14 maintcheck: remove an obsolete check * syntax-checks.mk (sc_perl_local_no_parens): Remove, we don't even allow the use of local but for the '$_' and '$~' special variables. (syntax_check_rules): Adjust.
Stefano Lattarini 2d951983 2012-02-23T19:21:00 build: do not quote `like this', as per GCS recommendation This patch converts the files implementing the automake's own build system to the use of new quoting format 'like this' or "like this" rather than `like this'. * bootstrap, configure.ac, syntax-checks.mk, Makefile.am, lib/Makefile.am, m4/Makefile.am, syntax-checks.mk: Update quoting format throughout, in comments and diagnostic. Some minor related rewordings and reformatting since we are at it.
Stefano Lattarini db973eaa 2012-02-21T19:47:36 tests: prefer 'configure.ac' over 'configure.in' With this change, our testsuite now uses 'configure.ac' as the name for the typical autoconf input, instead of the obsolescent 'configure.in' (which has been deprecated for several years, at least since autoconf 2.50). Most of the test cases changed by this commit have been automatically modified with this sed command (using GNU sed): sed -i 's/\<configure\(\\\?\)\.in\>/configure\1.ac/g' * syntax-checks.mk (sc_tests_no_configure_in): New syntax check. (syntax_check_rules): Add it. * tests/defs: Create stub for autoconf input in 'configure.ac', not in 'configure.in'. Adjust comments. ($AUTOCONF, $AUTOHEADER, $AUTORECONF): Remove workaround for the infamous debian autoconf wrapper: we don't need such workaround anymore now that we name our autoconf input as 'configure.ac'. For more information, see commit v1.11-564-g63da492 "test defs: hack to support autoconf-wrapper programs" of 16-12-2011. * tests/README: Use 'configure.ac', not 'configure.in'. * Many many tests: Likewise. * tests/backcompat3.test: Adjust to avoid spurious failures. * tests/backcompat5.test: Likewise. * tests/missing6.test: Likewise. * tests/backcompat6.test: Likewise, and extend a bit since we are at it.
Stefano Lattarini 622a348e 2012-02-17T13:14:57 tests: TAP-based tests should error if no plan was specified After this change, it will still be OK for TAP-based tests not to report any explicit TAP plan -- but they should state *explicitly* that they want to do so, by calling the 'plan_' function with a proper argument (currently, either "later" or "unknonwn"). Motivated by a recent issue introduced by yesterday's commit 'v1.11-1959-g0699a84' (pointed out by Peter Rosin, and fixed by follow-up commit 'v1.11-1961-gea44190'). * tests/tap-functions.sh (plan_): Get rid of '$have_tap_plan_', and refactor use and initialization of '$planned_' in a way that will allow client script to get more information on which kind of plan (if any) has been declared by the former 'plan_' invocation. (skip_all_): Adjust. * tests/defs (exit trap): Only print the "lazy" TAP plan if 'plan_' has requested that *explicitly*. * syntax-check.mk (sc_tests_tap_plan): Remove: it's obsolete now, since a TAP-based test that doesn't call 'plan_' explicitly won't print any TAP plan, and the TAP driver will catch that and report an error. (syntax_check_rules): Adjust.
Stefano Lattarini f76cb63c 2012-02-16T18:44:13 maintcheck: whitelist some false positives Instead of tweaking or dumbing down some of our sources or tests in order not to make them spuriously trigger few maintainer checks, we tweak such checks instead. * syntax-checks.mk (sc_tests_overriding_macros_on_cmdline): Also allow the variable 'exp' to be overridden on the make command line. Whitelist the test 'make-dryrun.test' where appropriate. (sc_mkinstalldirs): When whitelisting the 'mkinstalldirs' occurrence in 'lib/Makefile.am', do not look for the exact line number: it is obviously too fragile.
Stefano Lattarini ef20e28b 2012-01-28T13:23:16 maintcheck: fix real and spurious warnings * lib/Makefile.am (install-data-hook): Correctly quote $(DESTDIR) occurrences. * Makefile.am (install-exec-hook, uninstall-hook): Likewise. (autodiffs): Prefer '$(am__cd)' to plain 'cd', where warranted. * doc/Makefile.am ($(srcdir)/amhello-1.0.tar.gz): Likewise. Also, prefer using AC_SUBST'd $(abs_top_builddir) over obtaining it at runtime from $(top_builddir). * syntax-check.mk (sc_mkinstalldirs): Tweak to whitelist known harmless occurrences of the checked-against usages. (sc_no_for_variable_in_macro): Likewise. * tests/CheckListOfTests.am (maintainer-check-list-of-tests): Tweak to avoid spuriously triggering the 'sc_no_for_variable_in_macro' maintainer check. Prefer '$(am__cd)' to plain 'cd' when warranted.
Stefano Lattarini 25d3adb1 2012-01-28T12:38:07 maintcheck: take advantage of some GNU make features We can do so now that our maintainer checks require GNU make unconditionally. * syntax-check.mk (ams, xtests): Redefine as "immediate variables", using the GNU make $(shell ...) builtin. (maintainer-check-list-of-tests): Take advantage of GNU make "-C" option. Don't use $(AM_MAKEFLAGS), we shouldn't need it with GNU make.
Stefano Lattarini e508e09d 2012-01-28T10:05:18 build: require GNU make in order to run the maintainer checks This is not a real regression in portability, since most maintainer check rules already assumed GNU grep, and were anyway only meant to run on the developers' systems (where we can safely assume the presence of GNU make). This change will allow us to take advantage, in future changes, of more GNU make features, thus simplifying or optimizing some of our maintainer rules. * GNUmakefile: New, including 'Makefile' and 'syntax-checks.mk'. * configure.ac (AC_CONFIG_LINKS): Link it in the builddir. * Makefile.am (EXTRA_DIST): Distribute 'GNUmakefile' and 'syntax-checks.mk'. Move all syntax-check rules and auxiliary variables into ... * syntax-checks.mk: ... this new file, with some adjustments.