t/ax/am-test-lib.sh

Branch


Log

Author Commit Date CI Message
Paul Eggert 61075eab 2025-01-01T14:31:02 maint: make update-copyright
Paul Eggert 1d35638b 2024-06-07T08:41:45 maint: spelling and whitespace fixes Most of these spelling fixes are just to comments and documentation. However, some affect tests as follows: * t/cond36.sh (tparse.h): Fix misspelling of dependency. * t/disthook.sh: Fix misspelling of file. * t/help3.sh: Fix misspelling of long option. * t/instdir-ltlib.sh: Fix misspellings of macro names. This causes the test to fail, so someone with libtool expertise needs to look into this. * t/tap-no-spurious-numbers.sh (highno): Fix misspelling of shell var.
Bogdan f1112a88 2024-01-28T18:12:50 test: another check for PEP-3147 induced by Python 3.12.1. Fix for more of https://bugs.gnu.org/68119. * t/ax/am-test-lib.sh (python_has_pep3147) <am_pep3147_tag>: check sys.implementation.cache_tag as well as the (old) imp.get_tag. For Python 3.12.1.
Paul Eggert b80b5c47 2024-01-01T11:29:06 maint: make update-copyright
Karl Berry 354b7e47 2023-12-25T15:40:25 test: self-announce leading installcheck/protocol/PATH information. * t/ax/am-test-lib.sh (am_extra_info): self-announce where the initial reports on installcheck, test protocol, and PATH come from. Apparently this doesn't disturb the tests. If other people don't like the extra verbiage, no problem to remove.
Jacob Bachmeyer 62b3ff7b 2023-02-08T23:07:26 Improve test for blocked signals This fixes ERRORs reported by: * t/parallel-tests-interrupt.tap * t/self-check-exit.tap * t/self-check-is-blocked-signal.tap * t/tap-signal.tap * t/ax/am-test-lib.sh (is_blocked_signal): Revise Perl code to more closely follow documented interfaces where available. This also works around bugs and limitations of the POSIX module in Perl 5.6. Copyright-paperwork-exempt: yes
Mike Frysinger 34bdde96 2023-01-04T02:00:14 maint: make update-copyright
Jim Meyering 6c8ff6a8 2022-01-12T14:15:12 maint: make update-copyright
Jim Meyering a470a47f 2021-07-11T19:19:42 maint: make update-copyright
Jim Meyering cf27a3df 2020-01-01T11:44:41 maint: make update-copyright
Paul Eggert 5ae02cc8 2019-10-14T13:46:55 maint: make update-copyright
Mathieu Lirzin bbaa4cdc 2018-01-04T16:19:30 maint: Update copyright years to 2018 This update has been made with 'make update-copyright'.
Mathieu Lirzin c2757b97 2017-09-19T13:43:07 maint: Reset master
Paul Eggert 3562e384 2017-09-16T13:03:36 Prefer https: URLs 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.
Paul Eggert 199e7a44 2017-09-16T13:03:36 Prefer https: URLs 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.
Mathieu Lirzin d8add592 2017-03-02T18:55:53 maint: Update copyright years to 2017. This update has been made with 'make update-copyright'.
Jim Meyering 1370ce5f 2017-01-01T08:34:49 maint: update copyright dates for 2017 * all files: Run this command, using update-copyright from gnulib: UPDATE_COPYRIGHT_FORCE=1 \ UPDATE_COPYRIGHT_USE_INTERVALS=2 \ UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79 \ update-copyright $(git ls-files)
Jonathan L Peyton c40e27e1 2015-11-24T12:19:19 compile: add icl to compile wrapper script * lib/compile: Have icl be treated similarly to cl (scriptversion): Update. * t/ax/am-test-lib.sh (require_tool): Handle icl. * t/compile7.sh: Add new test file for icl... * t/list-of-tests.mk (handwritten_TESTS): ...and use it. * NEWS: Update. * THANKS: Update. Copyright-paperwork-exempt: yes Signed-off-by: Peter Rosin <peda@lysator.liu.se>
Stefano Lattarini 5de75f07 2015-01-05T22:48:33 maint: update copyright years to 2015 (branch 'micro') Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini a78f63c5 2014-04-21T15:10:54 maint: update copyright years We've been in 2014 already for few months now... Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini a6d6734f 2013-12-24T16:27:28 TAP driver: remove perl implementation (move it into contrib/) That implementation was only meant as a standard against which the portable awk+shell implementation was to be measured. Now, since Automake 1.12, the latter implementation is fully functional and already used in the wild, and in fact feature-par with the perl implementation. So the perl implementation is now just slowing down and complicating our testsuite. Let's move it to 'contrib/' (we don't want to remove it, in case someone is actually using it in the wild). * lib/tap-driver.pl: Move it ... * contrib/tap-driver.pl: ... here. While at it, convert quoting `like this' to quoting 'like this', and remove an obsolescent FIXME comment. * lib/Makefile.inc (dist_script_DATA): Drop '%D%/tap-driver.pl'. * Makefile.am (EXTRA_DIST): Add 'contrib/tap-driver.pl'. * doc/automake.texi: Remove one stray reference to 'tap-driver.pl', and reference 'tap-driver.sh' instead, as intended. * t/ax/am-test-lib.sh ($am_tap_implementation): Delete definition and uses. (fetch_tap_driver): Simplify to unconditionally assume the shell+awk implementation of the TAP driver is used. (get_shell_script): Make more flexible so that it can cater to the needs of 'fetch_tap_driver()'. * t/tap-bad-prog.tap: Likewise. * t/tap-bailout-leading-space.sh: Likewise. * t/tap-signal.tap: Likewise. * t/tap-test-number-0.sh: Likewise. * t/test-driver-cond.sh: Use 'tap-driver.sh' instead of 'tap-driver.pl'. * gen-testsuite-part (%test_generators): Do not generate sister tests that use the perl TAP driver rather than the shell+awk one. * NEWS: Update. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini ec163633 2013-06-27T11:11:35 tests: don't risk hanging on the 'cl' requirement On the GNU/Linux boxes of some users that run our testsuite there is a '/usr/local/bin/cl' executable, from the IRAF package: <http://iraf.noao.edu/> The test 'compile4.sh' (and other tests) try to invoke the 'cl' command to check whether it's a Microsoft compiler; the IRAF cl is an interactive program, so it hangs on such invocation. In conclusion, the testsuite hangs for those users which have the IRAF cl early in PATH. Fix the issue by redirecting the input of cl from /dev/null when invoking it, which is enough to prevent the cl program from IRAF from hanging, and should have no effect on the behaviour of the Microsoft compiler. This change fixes automake bug#14707. * t/ax/am-test-lib.sh (require_tool): Adjust the handling of the 'cl' requirement. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 649c03b4 2013-05-29T14:54:47 Merge branch 'micro' into maint * micro: t/README: document "run_make", discourage "make -e" cosmetics: tiny whitespace fixlets tests: avoid a spurious failure with MSVC tests: avoid a spurious failure on non-POSIX systems
Stefano Lattarini 88b04360 2013-05-29T13:55:48 cosmetics: tiny whitespace fixlets Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 94d57f3d 2013-05-28T17:53:03 Merge branch 'micro' into maint * micro: docs: AM_PROG_MKDIR_P: will not be removed in 2.0 release of Automake maint: sanity checks in 'check-minimal-autoconf' convenience target maint: test minimal supported autoconf through convenience target maint: install minimal supported autoconf through convenience targets test-lib: typofix in comments
Stefano Lattarini 3fd6f164 2013-05-26T20:51:57 test-lib: typofix in comments * t/ax/am-test-lib.sh: In here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 3f19ee5f 2013-05-26T14:09:20 Merge branch 'micro' into maint * micro: tests: adjust or remove some obsolete comments tests: remove some useless 'unset' of variables
Stefano Lattarini e5b40a3e 2013-05-26T13:30:52 Merge branch 'prog-cc-c-o-work' into maint * prog-cc-c-o-work: tests: some tests make no sense if "$CC -c -o" doesn't work AM_PROG_CC_C_O: don't rely on AC_PROG_CC_C_O, re-implement similar logic compile: rewrite AC_PROG_CC with AM_PROG_CC_C_O contents
Stefano Lattarini 2ea48f45 2013-05-26T12:42:04 tests: adjust or remove some obsolete comments * t/ax/am-test-lib.sh: Here. * t/distcheck-configure-flags.sh: And here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini d81424aa 2013-05-26T12:04:48 Merge branch 'micro' into maint * micro: tests: avoid a couple of extra sleep with GNU make NEWS: document testsuite work for 1.13.3 lint: remove a couple of obsolete syntax checks lint: cosmetics: use #-comments, not ##-comments lint: cosmetics: some reordering lint: recipes of syntax check require GNU grep; ensure it is used lint: better name for a syntax check tests: rename $am_make_rc_got -> $am_make_rc tests: ensure $required is not set too late Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 74c1336d 2013-05-24T20:54:41 tests: rename $am_make_rc_got -> $am_make_rc The latter is more natural More importantly, I keep misspelling the former over and over. * t/ax/am-test-lib.sh (run_make): Update. * t/ax/tap-summary-aux.sh: Adjust. * t/ax/testsuite-summary-checks.sh: Likewise. * t/parallel-tests-exit-statuses.sh: Likewise. * t/parallel-tests-extra-programs.sh: Likewise. * t/parallel-tests-fd-redirect-exeext.sh: Likewise. * t/parallel-tests-fd-redirect.sh: Likewise. * t/parallel-tests-fork-bomb.sh: Likewise. * t/parallel-tests-no-spurious-summary.sh: Likewise. * t/parallel-tests-recheck-pr11791.sh: Likewise. * t/parallel-tests-reset-term.sh: Likewise. * t/tap-signal.tap: Likewise. * t/test-driver-acsubst.sh: Likewise. * t/test-driver-cond.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini b2b6269f 2013-05-15T15:48:08 tests: some tests make no sense if "$CC -c -o" doesn't work So just skip them, to avoid spurious failures when running "make check-no-cc-c-o". * t/ax/am-test-lib.sh (require_tool): New requirement '-c-o'. * t/subobj10.sh ($required): Add it. * gen-testsuite-part (%depmodes): Adjust so that tests that use 'makedepend' will be skipped if the compiler is being forced not to grasp "-c -o". Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini ac13ca50 2013-05-24T12:17:59 Merge branch 'micro' into maint * micro: tests: use append mode to capture parallel make output tests: new convenience target 'check-parallel' Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini d19eb85c 2013-05-24T01:13:40 tests: use append mode to capture parallel make output This will allow us to run the Automake testsuite forcing all the make invocations in the test cases to run in parallel mode [1], but without hitting the spurious failure reported in automake bug#11413. See also: <http://lists.gnu.org/archive/html/bug-make/2013-05/msg00135.html> The make invocations in the test cases can be forced to run in parallel mode by, e.g., invoking "make check" like this: make check AM_TESTSUITE_MAKE="make -j16" The possible spurious failures hinted above are due to the fact that the redirected output of parallel make can racily lose lines. For example, if GNU make (3.82) is run with -j10 on a Makefile like this: all = 0 1 2 3 4 5 6 7 8 9 default: $(all) $(all): @sleep 0.$$(($RANDOM % 10)); echo $@ and has its standard output redirected in overwrite-mode to a regular file, it looses a line of that output every 15 runs or so on a Fedora 17 system with 64 ppc64 cores. Redirection in append mode does not suffer of this problem, as explained here: <http://lists.gnu.org/archive/html/automake-patches/2009-03/msg00073.html> See also previous commits v1.12-63-g45c1fcd of 2012-05-05 (tests: use append mode to capture parallel make output) and Release-1-10-280-g6426999 of 2009-03-10 (Use append mode to capture parallel test output). * t/ax/am-test-lib.sh (run_make): Adjust and enhance. * t/lisp8.sh: Take advantage of the enhancement, nd stop doing output redirection for $MAKE by hand. * t/tap-more.sh: Likewise. * t/parallel-tests-concurrency.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 8d710870 2013-05-22T15:59:06 Merge branch 'micro' into maint * micro: tests: remove some code duplication cosmetics: remove a couple of extra whitespaces in tests tests: two minor fixups
Stefano Lattarini 15996acc 2013-05-22T13:00:48 tests: remove some code duplication * t/ax/am-test-lib (null_install): New function. * t/instdir-java.sh: Use it instead of copied & pasted code. * t/instdir-lisp.sh: Likewise. * t/instdir-ltlib.sh: Likewise. * t/instdir-prog.sh: Likewise. * t/instdir-python.sh: Likewise. * t/instdir-texi.sh: Likewise. * t/instdir.sh: Likewise. * t/instdir2.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 4d56c0f3 2013-05-22T00:09:30 Merge branch 'micro' into maint * micro: tests: run_make: options to do command redirection tests: only activate 'unset' alias if required tests: better idiom to override make macro defs on the cmdline test-lib: minor style changes test-lib: fix botched function name in an error message Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini c7cfa093 2013-05-21T20:22:17 tests: run_make: options to do command redirection Let's improve the API of the 'run_make()' helper shell function by adding three new options: -O Save the standard output from make on disk, in a regular file named 'stdout'. -E Save the standard error from make on disk, in a regular file named 'stderr'. -M Save both the standard output and standard error from make on disk, in a regular file named 'output'. This option supersedes both the '-O' and '-E' options. This new API has two main advantages. 1. Its use will allow us to get rid of more cumbersome idioms like, e.g., $MAKE check >stdout && { cat stdout; exit 1; } cat stdout That can now be substituted with a simpler one: run_make -e FAIL -O check 2. More importantly, using the new API we will prevent any extra output from the shell traces of the code in run_make to be redirected along with the make stderr (where that was redirected). This problem was present in usages like, e.g., run_make TESTS=foo.test check 2>stderr && exit 1 grep 'expected error message' stderr Such usages are now to be rewritten as follows: run_make -e FAIL -E TESTS=foo.test check grep 'expected error message' stderr ensuring that 'stderr' won't end up containing unrelated stuff. Note that we do not convert in bulk the old idioms and the use of redirected 'run_make' invocations with this patch. We only convert some occurrences, to ensure that the new implementation of 'run_make' is sound enough. More sweeping conversions will likely be done in follow-up patches. * t/ax/am-test-lib.sh (run_make): Enhance and implement the extended API. * t/tap-xfail-tests.sh: Use the new 'run_make' API. * t/test-driver-cond.sh: Likewise. * t/tests-environment-fd-redirect.sh: Likewise. * t/uninstall-fail.sh: Likewise. * t/yacc-dist-nobuild.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini ffd4ecc9 2013-05-20T11:23:01 tests: better idiom to override make macro defs on the cmdline We now do so with a new wrapper shell function 'run_make()', which relies on the use of AM_MAKEFLAGS, avoiding the use of the '-e' make option. The use of that option (that causes the environment variables to take precedence over the macro definitions in the Makefile) has proved to be quite brittle in the past, causing annoying and sometimes problematic spurious failures. This has worsened in some still unpublished work going on in development branches. It's time to solve the issue once and for all. Note that we do not convert all uses of $MAKE in the testsuite right away; we might do so in follow-up changes, with leisure, to avoid a "patch bomb" effect (this commit is already too much of a bomb itself). What we do in this commit is to get rid of all "$MAKE -e" invocations. We admit that the implementation and feature-set of 'run_make()' are far from perfect, but good enough for our current purposes. We'll improve 'run_make()' if and when the need arises. * syntax-checks.mk (sc_tests_no_make_e): New syntax check, guard against the use of "$MAKE -e". (syntax_check_rules): Add it. (sc_tests_overriding_macros_on_cmdline): Adjust. (lint): New, alias for 'maintainer-check', for lazy typists. Idea backported from the 'maint' branch (Automake 1.13a). * t/ax/am-test-lib.sh (run_make): New function. Run $MAKE with the given command-line arguments, handling command-line override of variable definitions in a smart way (using AM_MAKEFLAGS if a non-GNU make implementation is detected to be in use). (useless_vpath_rebuild): Adjust to use 'run_make', to avoid a spurious maintainer check failure. (yl_distcheck): Use 'run_make' rather than bare '$MAKE'. (single_quote, append_single_quoted, is_valid_varname): New auxiliary function, used, directly or indirectly, by it. * Many tests: Adjust to avoid the use of "$MAKE -e", and prefer the use of 'run_make' in few other contexts as well, where it makes sense. Other minor fixlets while at it. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 12cfd38f 2013-05-20T15:17:11 test-lib: minor style changes * t/ax/am-test-lib.sh (require_tool): Here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 8a39c6de 2013-05-20T15:07:48 test-lib: fix botched function name in an error message * t/ax/am-test-lib.sh (useless_vpath_rebuild): Here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 0cca184f 2013-05-18T15:23:20 Merge branch 'micro' into maint * micro: lisp: fix a failure with Solaris /usr/xpg4/bin/sh tests: sanitize 'unset' usages tests: fix some botched/outdated comments tests: use perl, not find+rm, to remove temporary directories Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 84e12c32 2013-05-17T13:45:44 tests: sanitize 'unset' usages In some shells (e.g., Solaris 10 /bin/ksh, or NetBSD 5.1 /bin/sh), "unset VAR" returns a non-zero exit status in case the VAR variable is already unset. This doesn't interact well with our usage of "set -e" in the testsuite. So far, we've avoided spurious failures by either explicitly ignoring the exit status from unset: unset VAR || : or explicitly ensuring that a variable is set, before trying to unset it: VAR=; unset VAR But we can do better, by aliasing the 'unset' command to a custom function that will take care of these details for us. This will avoid us annoying spurious failures in the future, failures that have already bitten us too much times. For an example, refer to commit 'v1.12.2-88-g5b1dae5' of 2012-08-05 (tests: avoid tons of spurious failures on NetBSD). * t/ax/test-lib.sh (_am_unset): New function. (unset): New alias to it. (_am_exit): Adjust comments. * t/ax/am-test-lib.sh: No need to temporary disable the 'errexit' shell flag when unsetting variables that are potentially already unset. (am_process_requirements): Adjust to remove a now-useless workaround related to unset. * t/aclocal-macrodir.tap: Likewise. * t/aclocal-macrodirs.tap: Likewise. * t/auxdir-autodetect.sh: Likewise. * t/ax/am-test-lib.sh: Likewise. * t/ax/test-lib.sh: Likewise. * t/check-tests-in-builddir.sh: Likewise. * t/dist-formats.tap: Likewise. * t/distcheck-configure-flags-am.sh: Likewise. * t/distcheck-configure-flags.sh: Likewise. * t/java-empty-classpath.sh: Likewise. * t/javaflags.sh: Likewise. * t/lflags.sh: Likewise. * t/lflags2.sh: Likewise. * t/lisp-flags.sh: Likewise. * t/lisp6.sh: Likewise. * t/missing-auxfile-stops-makefiles-creation.sh: Likewise. * t/parallel-am.sh: Likewise. * t/parallel-am2.sh: Likewise. * t/parallel-am3.sh: Likewise. * t/parallel-tests-log-override-recheck.sh: Likewise. * t/pkg-config-macros.sh: Likewise. * t/python-missing.sh: Likewise. * t/python-too-old.sh: Likewise. * t/python11.sh: Likewise. * t/self-check-dir.tap: Likewise. * t/self-check-report.sh: Likewise. * t/self-check-seq.tap: Likewise. * t/silent-configsite.sh: Likewise. * t/suffix6c.sh: Likewise. * t/tar-override.sh: Likewise. * t/tests-environment-and-log-compiler.sh: Likewise. * t/vala-configure.sh: Likewise. * t/werror3.sh: Likewise. * t/yflags-cmdline-override.sh: Likewise. * t/yflags.sh: Likewise. * t/yflags2.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 52a76013 2013-05-15T22:54:15 Merge branch 'micro' into maint * micro: post-release: micro version bump (1.13.2a) release: stable micro release 1.13.2 vala tests: skip in a cross compiler setup HACKING: miscellaneous fixes, updates and enhancements NEWS: minor improvements to wording (about new versioning scheme) Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 4348577b 2013-05-15T22:05:21 vala tests: skip in a cross compiler setup The "vala + pkg-config" doesn't interact well with cross-compilation: <https://mail.gnome.org/archives/vala-list/2012-September/msg00094.html> That is causing annoying failures in our testsuite when it's run in cross-compilation mode. It's not worth trying too be overly smart and work around these problems; just skip the affected tests instead. * t/ax/am-test-lib.sh (require_tool): A new requirement 'valac', telling that the test needs to compile Vala-generated C files. In particular, this causes the test to be skipped when using a cross-compiler. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini f637fc39 2013-02-15T15:06:19 Merge branch 'branch-1.13.2' into maint * branch-1.13.2: typofix: in comments in 't/ax/test-lib.sh' tests on TAP: don't run the driver with perl unconditionally typofix: in comments in 'automake.in' tests: remove obsolete (and now wrong) comment typofix: in diagnostic in test 't/tap-realtime.sh' automake: fix reference to relevant tests in comments NEWS: we no longer plan to drop $(INCLUDES) support in next major version
Stefano Lattarini 43e25e38 2013-02-14T11:46:58 tests: remove obsolete (and now wrong) comment * t/ax/am-test-lib.sh: Here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 34001a98 2013-01-09T23:16:53 compile: use 'compile' script when "-c -o" is used with losing compilers 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>
Stefano Lattarini 7df8b28c 2012-12-31T18:18:37 maint: update copyright year for 2013 (in branch maint) Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini de736a22 2012-12-14T10:43:21 Merge branch 'maint' * maint: docs: fixlet about xz compression levels and command line options maint: more files excluded in 'update-copyright' maint: adapt 'update-copyright' recipe to the new $(FETCHFILES) format HACKING: update instructions to update the manuals at www.gnu.org maint: add an explicative comment in Makefile maint: factor out the name of the dir where web manuals are generated maint: rename rules to build/upload web manuals cosmetic: minor variable and rules reordering in Makefile.am docs: build the web manuals for CVS in the builddir, not in the srcdir release: automate uploading of web manuals in CVS docs: AM_CFLAGS: remove reference to non-existing "more detailed" desc tests: avoid two spurious failures on FreeBSD tests: improve 'pkg-config' requirement
Stefano Lattarini 7a4e1937 2012-12-13T09:46:18 tests: improve 'pkg-config' requirement This improves (and unifies among different tests) the detection of both the 'pkg-config' program and m4 macros provided by it; they are needed in particular by tests on Vala support. Before this, some Vala-related tests were failing spuriously when the pkg-config program was available but the macros from pkg.m4 were not made explicitly available in ACLOCAL_PATH. These tests were: vala-mix vala-mix2 vala-parallel vala-vapi vala-vpath See also similar commit 'v1.11-581-gb7d67d5' of 2011-12-22, "tests: better handling of gettext and libtool requirements". * t/ax/am-test-lib.sh (process_requirements): If a requirement matches the 'pkg-config*' wildcard, try to make available to it the pkg-config m4 macros, and skip it if it's not possible. This is done by sourcing the 'get.sh' fragment generated by ... * t/pkg-config-macros.sh: ... this new test, which looks in advance for the 'pkg-config' program and the m4 macros that comes with it. * t/list-of-tests.mk: Add the new test. * gen-testsuite-part (%deps_extractor): Tests requiring pkg-config will need the m4 macros coming with it; so these tests should be run after the 'pkg-config-macros.sh' test. Automatically generate proper declarations for such dependencies. * t/vala-header.sh: No need to explicitly check that the macro PKG_CHECK_MODULES has been expanded by autoconf. * t/vala-libs.sh: Likewise. * t/vala-non-recursive-setup.sh: Likewise. * t/vala-per-target-flags.sh: Likewise. * t/vala-recursive-setup.sh: Likewise. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini cb6a19d9 2012-11-21T14:13:02 Merge branch 'maint' * maint: tests: fix a spurious failure when $PYTHON is in the environment python tests: support PEP-3147 installation layout python: uninstall cater to PEP-3147 tests: improve a comment tests: honour $PYTHON override tests: typofix in message news: document fix for bug#8847 (PEP-3147, __pycache__) python: improve support for modern python (CPython 3.2 and PyPy) Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini e1acf4a0 2012-11-19T22:19:21 python tests: support PEP-3147 installation layout This fixes several spurious testsuite failures with python >= 3.2, introduced by recent commit v1.12.4-43-ge0e99ed, "python: improve support for modern python (CPython 3.2 and PyPy)". * t/ax/am-test-lib.sh (python_has_pep3147, pyc_location, py_installed): New functions. ($am_pep3147_tag): New variable. * t/py-compile-basic2.sh: Deleted, too difficult to adapt for the gain it would offer; move the still relevant parts ... * t/py-compile-basic.sh: ... here. Adapt and adjust the rest of the test as well. * t/nobase-python.sh: Adapt and adjust. * t/py-compile-basedir.sh: Likewise. * t/py-compile-destdir.sh: Likewise. * t/py-compile-option-terminate.sh: Likewise. * t/python-pr10995.sh: Likewise. * t/python-virtualenv.sh: Likewise. * t/python10.sh: Likewise. * t/python12.sh: Likewise. * t/python3.sh: Likewise. * t/list-of-tests.mk: Adjust list of tests. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini cae0d860 2012-11-11T12:39:40 tests: improve a comment * t/ax/am-test-lib.sh (require_tool): Here, about python support for '--version' option. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini c3dc9003 2012-11-11T12:03:46 tests: honour $PYTHON override * t/ax/am-test-lib.sh (require_tool): Here. * t/python-too-old.sh: And here. * t/python-vars.sh: And here. * t/python-virtualenv.sh: And here. Also add some sanity checks while at it. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 2a7c9aea 2012-08-05T17:45:07 Merge branch 'maint' * maint: tests: avoid spurious failures with older Texinfo tests: avoid tons of spurious failures on NetBSD runtest: avoid spurious failures on NetBSD news: dependency tracking for Portland Group Compilers is now supported
Stefano Lattarini 5b1dae57 2012-08-05T12:14:19 tests: avoid tons of spurious failures on NetBSD * t/ax/am-test-lib.sh (process_requirements): Set the '$am_tool' variable to the empty string before trying to unset it; otherwise, we might be attempting to unset an already-unset variable, which (together with the presence of the 'errexit' shell flag) causes spurious failures at least with the /bin/sh shell from NetBSD 5.1. This was actually causing the great majority of the Automake tests (all those not using a "required=..." declaration) to fail spuriously on that platform! 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 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 d8b3c5e4 2012-07-26T12:21:40 tests: protect test libs against multiple inclusion * t/ax/test-lib.sh, t/ax/am-test-lib.sh: Return early if already sourced. Use the witness variables '$test_lib_sourced' and '$am_test_lib_sourced', respectively, for this purpose. * runtest.in, Makefile.am (AM_TESTS_ENVIRONMENT): Unset 'test_lib_sourced' and 'am_test_lib_sourced', to avoid interferences from the environment. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
Stefano Lattarini 55fb7140 2012-07-25T22:49:02 tests: split test libs into "generic" and "automake-specific" This is the first step in the quest to merge the generically useful parts of our test suite framework in a more generic project, like Gnulib. Time will tell if we'll succeed, and whether the success will be worth the extra hassle. * t/ax/test-init.sh: Split out ... * t/ax/am-test-lib.sh, t/ax/test-lib.sh: ... into these two tests. * defs, Makefile.am: Adjust. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>