* Stefano Lattarini wrote on Tue, Jun 22, 2010 at 06:48:00PM CEST: > Yet another testsuite-tweaking patch.
> * tests/depcomp.test: Do not create useless dummy source files. > Add a trailing `:' command. > * tests/depcomp2.test: Use `unset' on the CFLAG variable to ensure > it's not in in the environment, rather than exporting it with an > empty value. Do not pass CC=gcc to configure, as that's already > done in ./defs since we have gcc in $required. Ensure verbose > printing of captured stderr, and normalize its checking. Add a > trailing `:' command. > * tests/depcomp3.test: Quote literal dots and dollar characters in > grep regexps. Always use `: >' rather than `touch' to create empty > files. Explicitly declare phony targets as such in the created > Makefile.am. Add a trailing `:' command. > * tests/depcomp4.test: Quote literal dots and dollar characters in > grep regexp. Explicitly declare phony targets as such in the > created Makefile.am. Ensure verbose printing of captured makes' > stoud/stderr. Add a trailing `:' command. > * tests/depcomp5.test: Move setting of `errexit' shell flag earlier > in the script (just after inclusion of ./defs). Quote literal dots > and dollar characters in grep regexps. Explicitly declare phony > targets as such in the created Makefile.am. Add a trailing `:' > command. > * tests/depcomp6.test: Consistently use m4 quoting in the generated > configure.in. Cosmetic fixes to spacing. Add a useful comment > about an apparently useless use of an `if' statement. > * tests/depcomp7.test: Likewise, and add a trailing `:' command. This one needs fixes. > --- a/tests/depcomp2.test > +++ b/tests/depcomp2.test > @@ -43,11 +43,12 @@ END > : > subdir/foo.c > > # Ignore user CFLAGS. > -CFLAGS= > -export CFLAGS > +unset CFLAGS Unsetting a variable which is not set can cause nonzero exit status; see autoconf.info. This code has errexit set. > --- a/tests/depcomp6.test > +++ b/tests/depcomp6.test > @@ -20,11 +20,11 @@ > > set -e > > -cat >> configure.in << 'END' > +cat >>configure.in <<'END' Tsk. > AC_PROG_CC > AM_PROG_CC_C_O > AC_PROG_RANLIB > -AC_CONFIG_FILES(sub2/Makefile) > +AC_CONFIG_FILES([sub2/Makefile]) > AC_OUTPUT > END > > @@ -94,6 +94,11 @@ else > cd sub2 > $sleep > echo 'choke me' > sub3/ba3.h > + # Do not use `$MAKE && Exit 1' here, since even relatively-recent > + # versions of the BSD shell wrongly exit when the `errexit' shell > + # flag is active if a command within "&&" fails inside a compound > + # statement. > if $MAKE; then Exit 1; fi I guess that is missing 'else :;' then, too, so that the result of the compound command is zero. Likewise depcomp7.test. > fi > + > : Thanks, Ralf