From: Stefano Lattarini Date: Thu, 10 Nov 2011 11:55:00 +0000 (+0100) Subject: Merge branch 'maint' X-Git-Tag: ng-0.5a~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ae2d671ab95a7ee0cbc58d0112a24873135188a;p=thirdparty%2Fautomake.git Merge branch 'maint' * maint: tests: avoid a spurious failure of 'ltinit.test' MinGW tests: testsuite is now safe to run with dmake in parallel mode tests: fix spurious failures w.r.t. parallel make and colorization tests: fix spurious failure in 'distcheck-override-infodir.test' tests: avoid another failure of 'uninstall-fail.test' on Solaris --- 3ae2d671ab95a7ee0cbc58d0112a24873135188a diff --cc ChangeLog index 443e15e61,944183e5d..c9dddb4fd --- a/ChangeLog +++ b/ChangeLog @@@ -1,207 -1,46 +1,250 @@@ + 2011-11-10 Stefano Lattarini + + tests: avoid a spurious failure of 'ltinit.test' MinGW + * tests/ltinit.test: Be laxer in grepping configure output, to + avoid spurious failures on systems which lack POSIX dynamic + linking (e.g., MinGW), or when cross-compiling for such systems. + See also commit `v1.11-855-ge9e5d4a'. + Report and suggestion from Peter Rosin. + + 2011-11-08 Stefano Lattarini + + tests: testsuite is now safe to run with dmake in parallel mode + * tests/defs.in: Unset variables DMAKE_CHILD, DMAKE_DEF_PRINTED + and DMAKE_MAX_JOBS, which are exported by Solaris dmake when run + in parallel mode, and which might confuse make processes spawned + by our testsuite. + + 2011-11-08 Stefano Lattarini + + tests: fix spurious failures w.r.t. parallel make and colorization + * tests/color2.test: Skip the test if the $MAKE program fails to + consider the standard output as a tty when spawned by `expect'. + This is required for make implementations, like FreeBSD make and + Solaris dmake, that redirect the output of recipes to temporary + files or pipes when run in parallel mode. Since we are at it, + simplify the detection of a working `expect' program, and throw + in other minor simplifications. + + 2011-11-07 Stefano Lattarini + + tests: fix spurious failure in 'distcheck-override-infodir.test' + * tests/distcheck-override-infodir.test ($required): Add + 'install-info'. + + 2011-11-07 Stefano Lattarini + + tests: avoid another failure of 'uninstall-fail.test' on Solaris + * tests/uninstall-fail.test: On Solaris 10, if `/bin/rm' is run + with the `-f' option, it doesn't print any error message when + failing to remove a file (due to e.g., "Permission denied"). + Yikes. Cater to this incompatibility, by relaxing the test when + a faulty `rm' is detected. + +2011-11-05 Stefano Lattarini + + ar-lib: fix configure output for "unrecognized archiver interface" + * m4/ar-lib.m4: Ensure that, even when an error is hit while trying + to determine the archiver interface kind, the "checking archiver + interface" message from configure is properly terminated before + an error message is printed, to avoid slightly garbled output. + * tests/ar4.test: Enhance. + * tests/ar5.test: Likewise. + +2011-11-05 Stefano Lattarini + + Merge branch 'msvc' into master + * tests/extra-portability3.test: Use `$original_AUTOMAKE' instead + of hackishly extracting the first component of `$AUTOMAKE'. + * tests/extra-portability.test: Likewise. Also, since we are at + it, throw in a couple of small extensions and tweakings (suggested + by the minor merge conflicts). + +2011-11-04 Stefano Lattarini + + warnings: fix buglets for portability warnings + * lib/Automake/ChannelDefs.pm (switch_warning): Ensure the + correct implications and inter-dependencies between warnings + in the categories `portability', `extra-portability' and + `recursive-portability' are respected. Also add detailed + explicative comments, and references to the relevant tests. + * tests/dollarvar2.test: Update and extend. Also, remove + some unnecessary uses of `--force' option in automake calls. + * tests/extra-portability3.test: New test. + * tests/Makefile.am (TESTS): Add it. + +2011-11-04 Stefano Lattarini + + tests: extend tests on 'extra-portability' warning category + * tests/extra-portability.test: Redefine `$AUTOMAKE' to ensure we + have complete control over the automake options. Extend by using + also a setup where no `portability' warning is present (only an + `extra-portability' warning is). Other minor extensions. Remove + some redundant, verbose comments about the expected diagnostic. + +2011-11-04 Stefano Lattarini + + test defs: new functions to analyze configure help screen + * tests/defs (extract_configure_help, grep_configure_help): New + functions. + * tests/maintmode-configure-msg.test: Use them, reducing code + duplication and test brittleness. + * tests/help-depend.test: Likewise. + * tests/help-depend2.test: Likewise. + * tests/help-dmalloc.test: Likewise. + * tests/help-lispdir.test: Likewise. + * tests/help-multilib.test: Likewise. + * tests/help-python.test: Likewise. + * tests/help-regex.test: Likewise. + * tests/help-silent.test: Likewise. + * tests/help-upc.test: Likewise. + * tests/help-init.test: Make grepping of configure help screen + slightly stricter. + * tests/self-check-configure-help.test: New self test. + * tests/Makefile.am (TESTS): Add it. + From a report by Jim Meyering. + +2011-11-03 Stefano Lattarini + + tests: various minor tweakings, mostly related to AM_PROG_AR + * tests/alloca.test: Adjust to new portability requirements due + to the new AM_PROG_AR macro. + * tests/discover.test: Likewise. + * tests/libobj3.test: Likewise. + * tests/pluseq7.test: Likewise. Also, make grepping of automake + expected error message stricter. + * tests/stdlib.test: Likewise, and extend the test a bit. + * tests/parse.test (configure.in): Remove redundant call to + AC_PROG_RANLIB. + * tests/library2.test: Adjust to new portability requirements + due to the new AM_PROG_AR macro. Also ... + (configure.in): ... add call to AC_PROG_CC, to ensure automake + really fails for the expected reason. + +2011-11-03 Stefano Lattarini + + Merge branch 'msvc' into master + + * tests/instspc-tests.sh: Adjust to new portability requirements + due to the new AM_PROG_AR macro. + * tests/libobj-basic.test: Likewise. + * tests/libobj2.test: Likewise. + * tests/libobj15a.test: Likewise. + * tests/libobj15b.test: Likewise. + * tests/libobj15c.test: Likewise. + * tests/libobj16a.test: Likewise. + * tests/libobj16b.test: Likewise. + * tests/libobj17.test: Likewise. + * tests/libobj18.test: Likewise. + * tests/libobj19.test: Likewise. + * tests/libobj20a.test: Likewise. + * tests/libobj20b.test: Likewise. + * tests/libobj20c.test: Likewise. + * tests/canon6.test: Likewise. + * tests/canon6.test: Likewise. + * tests/canon7.tests: Likewise. + * tests/extra9.test: Likewise. + * tests/extradep.test: Likewise. + * tests/extradep2.test: Likewise. + * tests/posixsubst-ldadd.test: Likewise. + * tests/posixsubst-libraries.test: Likewise. + * tests/posixsubst-ltlibraries.test: Likewise. + * tests/python-virtualenv.test: Likewise. + * tests/vartypos.test: Likewise. + * tests/vartypo2.test: Likewise. + * tests/suffix.test: Update to take into account previous + master-only changes. + * tests/suffix2.test: Likewise. + * tests/libobj7.test: Call automake with the `--add-missing' + option, instead of creating a dummy `ar-lib' file, since this + test now also runs "./configure" and "make". + * tests/suffix5.test: Copy the real `ar-lib' script file, + instead of creating a dummy one, since this test now also + runs "./configure" and "make". + * tests/extra-portability2.test: Fix this test not to rely + on the older, faulty semantics of "strictness specification + always reset warning level", which has been fixed in commit + v1.11-623-g1609491 (see also automake bug#7669 a.k.a. PR/547). + Since we are at it, throw inf few other minor unrelated + improvements. + * tests/extra-portability.test: Explicitly pass `-Wall' to + automake calls, for clarity. + +2011-10-21 Peter Rosin + + warnings: new 'extra-portability' category, for AM_PROG_AR + * lib/Automake/ChannelDefs.pm: Register new extra-portability + warning channel. + (switch_warning): Turn off extra-portability if portability is + turned off, and turn on portability if extra-portability is + turned on. + (set_strictness): Silence extra-portability for --gnits, --gnu + and --foreign. + * tests/extra-portability2.test: New test, checking that the + extra-portability channel is silenced by --gnits, --gnu and + --foreign. + * doc/automake.texi (Invoking Automake): Document the new warning + category and its interaction with the portability category. + * tests/extra-portability.test: New test, checking the interaction + between the portability and extra-portability warning categories. + * automake.in (handle_libraries, handle_ltlibraries): Move the + AM_PROG_AR warnings to the new extra-portability channel. + * tests/ar2.test: Adjust to the new warning channel. + * tests/pr300-lib.test: Likewise. + * tests/pr300-ltlib.test: Likewise. + * tests/pr307.test: Likewise. + * tests/pr401.test: Likewise. + * tests/pr401b.test: Likewise. + * tests/pr401c.test: Likewise. + * tests/pr72.test: Likewise. + * NEWS: Likewise. + * tests/Makefile.am (TESTS): Update. + +2011-10-21 Peter Rosin + Ralf Wildenhues + Stefano Lattarini + + Add new 'AM_PROG_AR' macro, triggering the 'ar-lib' script. + * m4/ar-lib.m4: New macro AM_PROG_AR, which locates an + archiver and triggers the auxiliary 'ar-lib' script if needed. + * m4/Makefile.am (dist_m4data_DATA): Update. + * automake.in ($seen_ar): New variable. + (scan_autoconf_traces): Set it. + (handle_libraries, handle_ltlibraries): Require AM_PROG_AR for + portability. + * doc/automake.texi (Public Macros): Mention the new + 'AM_PROG_AR' macro. + (Subpackages): Add AM_PROG_AR to the example. + (A Library): Adjust recommendations for AR given the new + AM_PROG_AR macro. + * All relevant tests: Adjust to new portability requirements due + to the new AM_PROG_AR macro. + * tests/ar-lib2.test: New test, checking that AM_PROG_AR triggers + install of ar-lib. + * tests/ar-lib3.test: New test, checking that lib_LIBRARIES + requires AM_PROG_AR. + * tests/ar-lib4.test: New test, checking that lib_LTLIBRARIES + requires AM_PROG_AR. + * tests/ar-lib5a.test: New test, checking that AM_PROG_AR triggers + use of ar-lib when the archiver is Microsoft lib. + * tests/ar-lib5b.test: New test, checking that AM_PROG_AR triggers + use of ar-lib when the archiver is a faked lib. + * tests/ar-lib6a.test: New test, checking the ordering of + AM_PROG_AR and LT_INIT. + * tests/ar-lib6b.test: New test, checking the ordering of + AM_PROG_AR and AC_PROG_LIBTOOL. + * tests/ar-lib7.test: New test, checking that automake warns + if ar-lib is missing. + * tests/ar3.test: New test, checking that AR and ARFLAGS may + be overridden by the user even if AM_PROG_AR is used. + * tests/ar4.test: New test, checking that AM_PROG_AR bails out + if it cannot determine the archiver interface. + * tests/ar5.test: New test, checking that AM_PROG_AR runs its + optional argument if it cannot determine the archiver interface. + * tests/defs.in: New required entry 'lib'. + * tests/Makefile.am (TESTS): Update. + * NEWS: Update. + 2011-11-03 Zack Weinberg (tiny change) Stefano Lattarini diff --cc tests/color2.test index eb9c52788,2217d8866..41ba8d991 --- a/tests/color2.test +++ b/tests/color2.test @@@ -36,16 -38,31 +36,31 @@@ case `echo "$std" | grep .` i *) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;; esac - # Check that we have a working expect program. - cat >expect-check <<'END' - #! /usr/bin/expect -f - eval spawn $env(THE_SYSTEM_SHELL) -c : - expect eof + # This test requires a working a working `expect' program. + (set +e; expect -c "exit 77"; test $? -eq 77) \ + || skip_ "requires a working expect program" + + # Also, if the $MAKE program fails to consider the standard output as a + # tty (this happens with e.g., BSD make and Solaris dmake when they're + # run in parallel mode; see the autoconf manual), there is little point + # in proceeding. + cat > Makefile <<'END' + all: + ## Creaive quoting in the `echo' below to avoid risk of spurious output + ## matches by `expect', below. + @test -t 1 && echo "stdout" "is" "a" "tty" END - THE_SYSTEM_SHELL=/bin/sh expect -f expect-check || { - echo "$me: failed to find a working expect program" >&2 - Exit 77 + cat > expect-check <<'END' -spawn $env(MAKE) ++eval spawn $env(MAKE) + expect { + "stdout is a tty" { exit 0 } + default { exit 1 } } + exit 1 + END + MAKE=$MAKE expect -f expect-check \ + || skip_ "make spawned by expect should have a tty stdout" + rm -f check Makefile # Do the tests. @@@ -106,9 -123,8 +121,7 @@@ test_no_color ( } cat >expect-make <<'END' - #! /usr/bin/expect -f -spawn $env(MAKE) -e check -expect eof +eval spawn $env(MAKE) -e check - expect eof END MAKE=$MAKE expect -f expect-make >stdout \ diff --cc tests/defs index 93a2106e5,f24d2ad4c..7199d8921 --- a/tests/defs +++ b/tests/defs @@@ -58,54 -46,80 +58,56 @@@ nl= # is defined initially, so that saving and restoring $IFS works. IFS=$sp$tab$nl -# Ensure we are running from the right directory. -test -f ./defs || { - echo "defs: not found in current directory" 1>&2 - exit 1 +# Ensure $testsrcdir is set correctly. +test -f "$testsrcdir/defs-static.in" || { + echo "$me: $testsrcdir/defs-static.in not found, check \$testsrcdir" >&2 + exit 99 } -if test -z "$srcdir"; then - # compute $srcdir. - srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'` - test "$srcdir" = $0 && srcdir=. -else :; fi - -# Ensure $srcdir is set correctly. -test -f "$srcdir/defs.in" || { - echo "$srcdir/defs.in not found, check \$srcdir" 1>&2 - exit 1 +# Ensure $testbuilddir is set correctly. +test -f "$testbuilddir/defs-static" || { + echo "$me: $testbuilddir/defs-static not found, check \$testbuilddir" >&2 + exit 99 } - # Unset some MAKE... variables that may cause $MAKE to act like a - # recursively invoked sub-make. Any $MAKE invocation in a test is -# The name of the current test (without the `.test' suffix). -# Test scripts can override it if they need to (but this should -# be done carefully, and *before* including ./defs). -if test -z "$me"; then - me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'` -elif env | grep '^me=' >/dev/null; then - echo "$0: variable \`me' is set in the environment: this is unsafe" >&2 - exit 99 -fi - -# Check that the environment is properly sanitized. -for var in required parallel_tests; do - if env | grep "^$var=" >/dev/null; then - echo "$me: variable \`$var' is set in the environment:" \ - "this is unsafe" >&2 - exit 99 - fi -done -unset var ++# Unset some make-related variables that may cause $MAKE to act like ++# a recursively invoked sub-make. Any $MAKE invocation in a test is +# conceptually an independent invocation, not part of the main +# 'automake' build. - unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO ++unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL ++unset __MKLVL__ MAKE_JOBS_FIFO # For BSD make. ++unset DMAKE_CHILD DMAKE_DEF_PRINTED DMAKE_MAX_JOBS # For Solaris dmake. +# Unset verbosity flag. +unset V +# Also unset variables that will let `make -e install' divert +# files into unwanted directories. +unset DESTDIR +unset prefix exec_prefix bindir datarootdir datadir docdir dvidir +unset htmldir includedir infodir libdir libexecdir localedir mandir +unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir +# Unset variables that might change the "make distcheck" behaviour. +unset DISTCHECK_CONFIGURE_FLAGS AM_DISTCHECK_CONFIGURE_FLAGS +# The tests call `make -e' but we do not want $srcdir from the environment +# to override the definition from the Makefile. +unset srcdir +# Also unset variables that control our test driver. While not +# conceptually independent, they cause some changed semantics we +# need to control (and test for) in some of the tests to ensure +# backward-compatible behavior. +unset TESTS_ENVIRONMENT AM_TESTS_ENVIRONMENT +unset DISABLE_HARD_ERRORS +unset AM_COLOR_TESTS +unset TESTS +unset TEST_LOG_COMPILER +unset TEST_LOGS +unset TEST_SUITE_LOG +unset RECHECK_LOGS +unset VERBOSE -# This might be used in testcases checking distribution-related features. -# Test scripts are free to override this if they need to. -distdir=$me-1.0 -APIVERSION='@APIVERSION@' -PATH_SEPARATOR='@PATH_SEPARATOR@' - -# Make sure we override the user shell. -SHELL='@SHELL@' -export SHELL -# User can override various tools used. -test -z "$PERL" && PERL='@PERL@' -test -z "$MAKE" && MAKE=make -test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@" -test -z "$AUTOM4TE" && AUTOM4TE="@am_AUTOM4TE@" -test -z "$AUTORECONF" && AUTORECONF="@am_AUTORECONF@" -test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@" -test -z "$AUTOUPDATE" && AUTOUPDATE="@am_AUTOUPDATE@" -test -z "$MISSING" && MISSING=`pwd`/../lib/missing -# Use -Werror because this also turns some Perl warnings into error. -# (Tests for which this is inappropriate should use -Wno-error.) -test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror" - -# See how Automake should be run. We put --foreign as the default -# strictness to avoid having to create lots and lots of files. A test -# can override this by specifying a different strictness. Use -Wall -# -Werror by default. Tests for which this is inappropriate -# (e.g. when testing that a warning is enabled by a specific switch) -# should use -Wnone or/and -Wno-error -test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall" - -PATH="`pwd`$PATH_SEPARATOR$PATH" -echo "$PATH" -# Some shells forget to export modified environment variables. -# (See note about `export' in the Autoconf manual.) -export PATH +## ---------------------------- ## +## Auxiliary shell functions. ## +## ---------------------------- ## # We use a trap below for cleanup. This requires us to go through # hoops to get the right exit status transported through the signal.