summaryrefslogtreecommitdiff
path: root/t/ax/am-test-lib.sh
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-2/+2
| | | | | | | | | | | | | | | | | | | | | 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'.
* compile: add icl to compile wrapper scriptJonathan L Peyton2015-11-241-0/+11
| | | | | | | | | | | | | * 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>
* 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>
* TAP driver: remove perl implementation (move it into contrib/)Stefano Lattarini2013-12-241-34/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tests: don't risk hanging on the 'cl' requirementStefano Lattarini2013-06-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'micro' into maintStefano Lattarini2013-05-291-2/+0
|\ | | | | | | | | | | | | | | * 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
| * cosmetics: tiny whitespace fixletsStefano Lattarini2013-05-291-2/+0
| | | | | | | | Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'micro' into maintStefano Lattarini2013-05-281-1/+1
|\ \ | |/ | | | | | | | | | | | | | | * 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
| * test-lib: typofix in commentsStefano Lattarini2013-05-261-1/+1
| | | | | | | | | | | | * t/ax/am-test-lib.sh: In here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'micro' into maintStefano Lattarini2013-05-261-5/+3
|\ \ | |/ | | | | | | | | * micro: tests: adjust or remove some obsolete comments tests: remove some useless 'unset' of variables
| * tests: adjust or remove some obsolete commentsStefano Lattarini2013-05-261-5/+3
| | | | | | | | | | | | | | * t/ax/am-test-lib.sh: Here. * t/distcheck-configure-flags.sh: And here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'prog-cc-c-o-work' into maintStefano Lattarini2013-05-261-0/+5
|\ \ | | | | | | | | | | | | | | | | | | * 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
| * | tests: some tests make no sense if "$CC -c -o" doesn't workStefano Lattarini2013-05-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge branch 'micro' into maintStefano Lattarini2013-05-261-12/+12
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | * 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>
| * tests: rename $am_make_rc_got -> $am_make_rcStefano Lattarini2013-05-241-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'micro' into maintStefano Lattarini2013-05-241-14/+41
|\ \ | |/ | | | | | | | | | | | | * 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>
| * tests: use append mode to capture parallel make outputStefano Lattarini2013-05-241-14/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'micro' into maintStefano Lattarini2013-05-221-0/+32
|\ \ | |/ | | | | | | | | | | * micro: tests: remove some code duplication cosmetics: remove a couple of extra whitespaces in tests tests: two minor fixups
| * tests: remove some code duplicationStefano Lattarini2013-05-221-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Merge branch 'micro' into maintStefano Lattarini2013-05-221-10/+163
|\ \ | |/ | | | | | | | | | | | | | | | | | | * 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>
| * tests: run_make: options to do command redirectionStefano Lattarini2013-05-221-7/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * tests: better idiom to override make macro defs on the cmdlineStefano Lattarini2013-05-221-2/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * test-lib: minor style changesStefano Lattarini2013-05-201-7/+7
| | | | | | | | | | | | * t/ax/am-test-lib.sh (require_tool): Here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * test-lib: fix botched function name in an error messageStefano Lattarini2013-05-201-1/+1
| | | | | | | | | | | | * t/ax/am-test-lib.sh (useless_vpath_rebuild): Here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | Merge branch 'micro' into maintStefano Lattarini2013-05-181-9/+1
|\ \ | |/ | | | | | | | | | | | | | | | | * 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>
| * tests: sanitize 'unset' usagesStefano Lattarini2013-05-171-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'micro' into maintStefano Lattarini2013-05-151-0/+13
|\ \ | |/ | | | | | | | | | | | | | | | | | | * 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>
| * vala tests: skip in a cross compiler setupStefano Lattarini2013-05-151-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'branch-1.13.2' into maintStefano Lattarini2013-02-151-2/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | * 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
| * tests: remove obsolete (and now wrong) commentStefano Lattarini2013-02-141-2/+0
| | | | | | | | | | | | * t/ax/am-test-lib.sh: Here. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* | compile: use 'compile' script when "-c -o" is used with losing compilersStefano Lattarini2013-01-111-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Merge branch 'maint'Stefano Lattarini2012-12-141-7/+7
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
| * tests: improve 'pkg-config' requirementStefano Lattarini2012-12-131-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Merge branch 'maint'Stefano Lattarini2012-11-211-3/+63
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * python tests: support PEP-3147 installation layoutStefano Lattarini2012-11-191-0/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| * tests: improve a commentStefano Lattarini2012-11-111-1/+1
| | | | | | | | | | | | | | * t/ax/am-test-lib.sh (require_tool): Here, about python support for '--version' option. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
| * tests: honour $PYTHON overrideStefano Lattarini2012-11-111-2/+3
| | | | | | | | | | | | | | | | | | | | * 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>
* | Merge branch 'maint'Stefano Lattarini2012-08-051-1/+1
|\ \ | |/ | | | | | | | | | | | | * 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
| * tests: avoid tons of spurious failures on NetBSDStefano Lattarini2012-08-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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>
* | Merge branch 'maint'Stefano Lattarini2012-07-261-15/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* tests: "am_using_tap=yes" -> "am_test_protocol=tap"Stefano Lattarini2012-07-261-2/+2
| | | | | | | | | | | | | | | | | 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>
* tests: protect test libs against multiple inclusionStefano Lattarini2012-07-261-0/+4
| | | | | | | | | | * 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>
* tests: split test libs into "generic" and "automake-specific"Stefano Lattarini2012-07-261-0/+796
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>