summaryrefslogtreecommitdiff
path: root/t/add-missing.tap
Commit message (Collapse)AuthorAgeFilesLines
* maint: Update copyright years to 2018Mathieu Lirzin2018-01-041-1/+1
| | | | This update has been made with 'make update-copyright'.
* Prefer https: URLsPaul Eggert2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | In Gnulib, Emacs, etc. we are changing ftp: and http: URLs to use https:, to discourage man-in-the-middle attacks when downloading software. The attached patch propagates these changes upstream to Automake. This patch does not affect files that Automake is downstream of, which I'll patch separately. Althouth the resources are not secret, plain HTTP is vulnerable to malicious routers that tamper with responses from GNU servers, and this sort of thing is all too common when people in some other countries browse US-based websites. See, for example: Aceto G, Botta A, Pescapé A, Awan MF, Ahmad T, Qaisar S. Analyzing internet censorship in Pakistan. RTSI 2016. https://dx.doi.org/10.1109/RTSI.2016.7740626 HTTPS is not a complete solution here, but it can be a significant help. The GNU project regularly serves up code to users, so we should take some care here.
* maint: Update copyright years to 2017.Mathieu Lirzin2017-03-021-1/+1
| | | | This update has been made with 'make update-copyright'.
* maint: update copyright years to 2015 (branch 'micro')Stefano Lattarini2015-01-051-1/+1
| | | | Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* maint: update copyright yearsStefano Lattarini2014-04-211-1/+1
| | | | | | We've been in 2014 already for few months now... Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contentsStefano Lattarini2013-05-241-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a much simpler rewrite than the one we attempted in the past, and that was later removed by commit 'v1.13.1d-137-g32eb770' of 2013-05-11 (compile: avoid AC_PROG_CC messy rewrite). Not only this change simplifies the code a little, but has the welcome collateral effect of making automatic dependency tracking work better with compilers that doesn't grasp the '-c' and '-o' options together. Issues in that setup have been caught by several failures in the target 'check-no-cc-c-o'. Unfortunately, this change has less welcome collateral effects: 1. AM_PROG_AR must now be called *after* AC_PROG_CC; 2. Autoconf emits extra warnings when used with Automake-generated aclocal.m4. These are unacceptable regressions for a release, but since we are going to fix them soon enough in a follow-up patch (surely to be applied before Automake 1.14 is released) we don't worry too much. * m4/init.m4: Redefine AC_PROG_CC early, to automatically invoke AM_PROG_CC_C_O as well. Accordingly, drop now-unneeded "automagical" AM_PROG_CC_C_O expansion at later time (which took place thanks to a AC_CONFIG_COMMANDS_PRE call). * m4/minuso.m4 (AM_PROG_CC_C_O): Ensure the expansion of the body of this macro takes place with C as "current Autoconf language" (use AC_LANG_PUSH/AC_LANG_POP). * m4/ar-lib.m4 (AM_PROG_AR): Likewise. Also, require this macro to be expanded *after* AC_PROG_CC (so that any rewrite of $CC, if required, has already taken place). * t/add-missing.tap: Adjust to avoid spurious failures. * t/aclocal-deps.sh: Likewise, by having AM_PROG_AR called *after* AC_PROG_CC. * t/subobj-clean-lt-pr10697.sh: Likewise. * t/alloca.sh: Likewise. * t/condlib.sh: Likewise. * t/discover.sh: Likewise. * t/objc-megademo.sh: Likewise. * t/ccnoco.sh: Extend a little. * t/ccnoco-deps.sh: New test. * t/ccnoco-lib.sh: Likewise. * t/ccnoco-lt.sh: Likewise. * t/list-of-tests.mk: Add them. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* Merge branch 'micro' into maintStefano Lattarini2013-05-161-0/+0
|\ | | | | | | | | | | * micro: tests: remove exec bit from all of them ('micro' branch) maint: tests no longer need to have executable bit set
| * tests: remove exec bit from all of them ('micro' branch)Stefano Lattarini2013-05-161-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It gives the impression that they are directly runnable, as with "./t/foo.sh", but it has been a while since that was the case. Today, tests are runnable only through "make check" or "./runtest". This change is for the 'micro' branch (automake 1.13.2a). It will soon be followed by similar patches for the 'maint' branch (automake 1.13a) and the 'master' branch (automake 1.99a). * t/*.sh, t/*.tap: Remove executable bit. * maint.mk (sc_tests_executable): Remove. (syntax_check_rules): Adjust. * gen-testsuite-part: Set permissions of generated tests to '444' (-r--r--r--), rather than 555 (-r-xr-xr-x). Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | compile: avoid AC_PROG_CC messy rewriteStefano Lattarini2013-05-111-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead, add an hook to AC_OUTPUT to have AM_PROG_CC_C_O invoked automatically. See also the long-winded discussion about automake bug#13378. * m4/minuso.m4 (AM_PROG_CC_C_O): Bring back the old implementation, from commit v1.13.1-55-g1ab8fb6. * m4/init.m4 (AC_PROG_CC): Remove this horrible, hacky re-write. * (AM_INIT_AUTOMAKE): Arrange for AM_PROG_CC_C_O to be called if necessary. * t/am-prog-cc-c-o.sh: Adjust to avoid spurious failure. * t/subobj.sh: Likewise. Suggested-by: Nick Bowler <nbowler@elliptictech.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | compile: use 'compile' script when "-c -o" is used with losing compilersStefano Lattarini2013-01-111-3/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do so seen when only source files in the "current" directory are present. This commit is part of a series of related changes addressing automake bug#13378 (see also the plan 'PLANS/subdir-objects.txt'). Before this change, Automake-generated C compilation rules mistakenly passed the "-c -o" options combination unconditionally (even to losing compiler) when the 'subdir-objects' was used but sources were only present in the top-level directory. Issue spotted by Nick Bowler: <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#35> <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13378#44> We fix this by having Automake redefine AC_PROG_CC to take over the role of AM_PROG_CC_C_O and to require the 'compile' script unconditionally (albeit that will continue to be invoked only when inferior compilers are detected). Among other things, this means AM_PROG_CC_C_O explicitly is no longer required; that macro is still supported for backward-compatibility, but calling it is basically a no-op now. This change has some pros and some cons (obviously, we believe the former outweighs the latter). Here are the most relevant ones: + Pros 1: Some logic in the Automake script has been simplified. + Pros 2: That simplification has automatically fixed an actual bug (see Nick's mails referenced above; admittedly, that was present only in corner-case situations, but still); the test 't/ccnoco4.sh', which demonstrated the bug and has been failing so far, now passes. + Pros 3: Things works more "automagically" now (no need to manually add the AM_PROG_CC_C_O macro to configure.ac anymore). * Cons 1: The 'compile' script will be required in all projects using C compilation; this will only be a problem for packages not using '--add-missing'. However, such packages are definitely more rare than the ones using '--add-missing', and adjusting them will be trivial -- just copy the compile script over from the new Automake installation. * Cons 2: The copy & paste of autoconf internals hack this change has introduced in our "rewrite" of AC_PROG_CC is really an egregious abomination. It can only be justified with the fact that we expect future versions of autoconf to implement the semantics we need directly in AC_PROG_CC, so that we'll be able to leverage that (since Automake 1.14 will require the latest Autoconf version released). Now, the detailed list of file-by-file changes ... * automake.in ($seen_cc_c_o): Remove this global variable. (scan_autoconf_traces): Don't set it, and do not trace the 'AM_PROG_CC_C_O' m4 macro. (lang_c_rewrite): Remove, no longer needed. * doc/automake.texi: Adjust expected "autoreconf --install" output in the amhello example. Remove statements about the need for the AM_PROG_CC_C_O macro. Report it is obsolete now. * m4/init.m4: Re-write AC_PROG_CC to append checks about whether the C compiler supports "-c -o" together. These checks have basically been ripped out (with adaptations) from the 'AC_PROG_CC_C_O' macro of Autoconf and ... * m4/minuso.m4 (AM_PROG_CC_C_O): ... this macro of ours, which has thus basically become a no-op. * t/ax/am-test-lib.sh (am_setup_testdir): Also copy the 'compile' script in the test directory; if we don't do so, every test using AC_PROG_CC should call automake with the "--add-missing" option, or copy the 'compile' script itself. * t/cond11.sh: No need to create a dummy 'compile' script: that is already brought in by 'am_setup_testdir()', that is automatically invoked when 'test-lib.sh' is sourced. * t/add-missing.tap: Adjust: we expect the 'compile' script to be required by a mere AC_PROG_CC call now. * t/dist-auxdir-many-subdirs.sh: Likewise. * t/specflg6.sh: Likewise. * t/subobj4.sh: Likewise. * t/cxx-lt-demo.sh: Likewise, and update comments to match. * t/distcom2.sh: Enhance a little. * t/dollarvar2.sh: Adjust. * t/extra-portability.sh: Likewise. * t/libobj19.sh: Likewise. * t/per-target-flags.sh: Likewise. * t/repeated-options.sh: Likewise. * t/subobj.sh: Likewise, and enhance a little. * t/ccnoco2.sh: Remove as obsolete. * t/list-of-tests.mk (handwritten_TESTS): Adjust. (XFAIL_TESTS): Remove 't/ccnoco4.sh'. * NEWS: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* maint: update copyright year for 2013 (in branch maint)Stefano Lattarini2012-12-311-1/+1
| | | | Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: prefer including 'test-init.sh' rather than './defs'Stefano Lattarini2012-10-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a follow-up to today's commit v1.12.4-22-g0610fc8, "tests: prepare to move ./defs to t/ax/test-init.sh" * All tests: To run the common setup, use the command: . test-init.sh instead of the older, "historical" one: . ./defs || exit 1 Note that the "|| exit 1" wasn't really useful, since the 'errexit' shell flag is in effect in both './defs' and 'test-init.sh', and all the known shells that are good enough to run the automake testsuite do automatically exit with error when a sourced file cannot be found (at least, they do so in non-interactive mode, which is the only mode that concerns us in the testsuite). * t/ax/tap-summary-aux.sh, t/ax/testsuite-summary-checks.sh: Likewise. * gen-testsuite-part: Do the same in the generated tests. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* elisp: use suffix rules, get rid of 'elisp-comp' script (mostly a rewrite)Jack Kelly2012-07-141-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Motivated by automake bug#11806. Traditionally, automake byte-compiled emacs-lisp '.el' files by invoking 'elisp-comp' on all of them in a bulk; this involved complex timestamping and file-locking logic. It was also brittle in any slightly-unusual setup, because 'elisp-comp' operated by copying all of the elisp files to be compiled into a temporary sub-directory and compiling them in there, the copying the resulting byte-compile files back in the build directory. This patch removes all of that juggling and chicanery in favour of defining a much simpler '.el.elc' suffix rule. Not only this is simpler, but it also interacts better with "make -jN" calls, which are becoming more and more common and useful on today's increasingly multicore systems. * Makefile.am (dist_script_DATA): Remove 'elisp-comp'. * automake.in (@common_files): Likewise. (handle_emacs_lisp): Do not require 'elisp-comp'. * doc/automake.texi: Remove references to 'elisp-comp'. * lib/am/lisp.am: Define elisp compilation via a suffix rule; this basically amounts to a complete re-write of the lisp byte-compilation rules. * lib/elisp-comp: Remove. * t/add-missing.tap: Remove elisp-comp test. * t/dist-auxdir-many-subdirs.sh: Remove reference to elisp-comp. * t/primary-prefix-invalid-couples.tap: Likewise. * t/primary-prefix-valid-couples.sh: Likewise. * t/lisp4.sh: Remove reference to elc-stamp. * t/lisp5.sh: Likewise. * t/lisp6.sh: Likewise. * t/lisp3.sh: Likewise. Also remove the recompilation check that involves a (message) call. * t/lisp7.sh: Remove check for "Warnings can be ignored". Remove reference to elc-stamp. * t/lisp8.sh: Likewise. * t/lispdry.sh: Remove references to elc-stamp. Acked-by: Stefano Lattarini <stefano.lattarini@gmail.com> Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: remove stale workarounds for Solaris /bin/shStefano Lattarini2012-06-281-4/+2
| | | | | | | | | | | | | | | | | | | Our testsuite cannot be run with that shell anymore (as it is not POSIX-compliant). * t/tap-more.sh: Remove outdated workarounds for Solaris /bin/sh. * t/self-check-exit.tap: Likewise. * t/ansi2knr-no-more.sh: Likewise. * t/add-missing.tap: Likewise. * t/dist-auxfile.sh: Likewise. * t/test-driver-custom-multitest-recheck2.sh: Likewise. * t/ax/test-init.sh: Remove obsolete references to Solaris /bin/sh. * t/confh5.sh: Likewise. * t/uninstall-fail.sh: Likewise. And update comments about quirks of Solaris /bin/ksh and /usr/xpg4/bin/sh. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: simpler workaround for shells losing the exit status in exit trapStefano Lattarini2012-06-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: assume automake quotes 'like this', not `like this'Stefano Lattarini2012-06-221-3/+3
| | | | | | | * t/add-missing.tap: Here. This slightly simplifies and/or enhances some grepping checks on automake diagnostic. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: use more POSIX shell features our test scriptsStefano Lattarini2012-06-221-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Since commit 'v1.12-36-g2d68fd9' of 2012-05-07, "configure: search a sturdy POSIX shell to be used in the testsuite", the shell running our test script is assured to be a POSIX-conforming shell, so we can use the more modern and flexible idioms and features that we couldn't use when we also aimed at compatibility with non-POSIX Bourne shells, like Solaris /bin/sh. * t/README: Suggest to use POSIX shell features liberally in test cases, with possible exception of Makefile recipes and configure shell code. * Several tests: Adjust to use more POSIX shell features; e.g., $(...) rather than `...`, $((...)) rather than `expr ...`, "if ! CMD; then ..." instead of "if CMD; then :; else ...", and so on. In several places, when using the 'test' built-in, prefer '-eq' over '=' for numeric comparisons, and prefer "grep -c PATTERN FILE" over "grep PATTERN FILE | wc -l". Throw in other low-hanging easy improvements and fixlets while we are at it. * t/ax/depcomp.sh, t/ax/tap-summary-aux.sh, t/ax/tap-functions.sh, defs, defs-static.in: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* tests: rename 'tests/' => 't/', '*.test' => '*.sh'Stefano Lattarini2012-04-061-0/+391
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>