[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] {maint} Add some tests on 'cygnus' mode
From: |
Ralf Wildenhues |
Subject: |
Re: [PATCH] {maint} Add some tests on 'cygnus' mode |
Date: |
Wed, 22 Dec 2010 07:37:54 +0100 |
User-agent: |
Mutt/1.5.20 (2010-08-04) |
* Stefano Lattarini wrote on Tue, Dec 21, 2010 at 11:53:50PM CET:
> In view of a (partly-completed, soon-to-be-posted) patch series that
> should fix Automake bug#7669[1][2], I'd like to improve the testsuite
> coverage regarding the "cygnus" mode. Attached is a patch (for maint)
> which does that.
>
> [1] ``option "foreign" after "-Wall" turns off and portability warnings.''
> [2] a.k.a. PR/547 in the older gnats database
>
> Note that some of the new testcases are not really relevant for the
> refactoring, but I'd like to add them anyway while I'm at it.
>
> OK to apply the attached patch to maint?
I think master is sufficient for this.
> I'll wait the customary 72 hours before pushing.
FWIW I will be off-net completely starting sometime tomorrow and ending
sometime on the 28th.
> Subject: [PATCH] Add some tests on 'cygnus' mode.
>
> * tests/clean2.test: Renamed to ...
Erm.
> * tests/cygnus-distclean.test: ... this, and extended somewhat.
> * tests/cygnus-check-without-all.test: New test.
> * tests/cygnus-dependency-tracking.test: Likewise.
> * tests/cygnus-distclean.test: Likewise.
> * tests/cygnus-imply-foreign.test: Likewise.
> * tests/cygnus-no-dist.test: Likewise.
> * tests/cygnus-no-installinfo.test: Likewise.
> * tests/cygnus-requires-maintainer-mode.test: Likewise.
> * tests/Makefile.am (TESTS): Update.
> --- /dev/null
> +++ b/tests/cygnus-dependency-tracking.test
> +# Check that cygnus mode disables automatically dependency tracking.
s/automatically/automatic/
> +# And check that this *cannot* be overridden.
I think this is one of the major reason the classical Cygnus trees (GCC,
src/binutils, gdb) have mostly moved away from using the cygnus option,
with only a few uses remaining in sub trees.
IOW, this might not be such a great feature. (But OTOH it is not worth
worrying about it much either. The cygnus option exists to keep old
code working.)
> +# Check that 'cygnus' mode imply 'foreign' mode.
> +# We want complete control automake flags.
> +AUTOMAKE=`(set $AUTOMAKE && echo $1)` || Exit 99
This is ugly. What if I use
AUTOMAKE='perl -I foo /path/to/automake-1.X'
IOW, why not save the value of $AUTOMAKE without arguments in
defs-static.in before changing it, and using that here?
> --- /dev/null
> +++ b/tests/cygnus-no-dist.test
> +# Check that cygnus mode forbids creation of distribution tarball.
> +for target in dist distdir distcheck dist-all dist-gzip; do
> + $MAKE -n $target >out 2>&1 && { cat out; Exit 1; }
> + cat out
> + grep $target out
What is this grep for? Grepping make -n output is not such a good idea,
the output is quite variable between makes (but then again, haven't
checked either).
> +done
> +
> +# Now check that cygnus mode in a subdirectory disables
> +# distribution-building in that subdirectory.
> +
> +cat > Makefile.am <<'END'
> +SUBDIRS = sub1 sub2
> +END
> +
> +mkdir sub1 sub2
> +: > sub1/Makefile.am
> +cat > sub2/Makefile.am <<'END'
> +# The `-Wall' after `cygnus' should ensure no warning gets
> +# unintentionally disabled. We are particularily interested
> +# in overridewarnings, for when (below) we add the `distdir'
override warnings
> +# target.
> +AUTOMAKE_OPTIONS = cygnus -Wall
> +END
> --- a/tests/clean2.test
> +++ b/tests/cygnus-no-installinfo.test
> +# FIXME: -Wno-override work around a buglet in definition of $(MAKEINFO)
works
in the definition
> +# in cygnus mode; see also xfailing test `txinfo5.test'.
> +$AUTOMAKE --cygnus -Wno-override
Thanks,
Ralf