[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 12/10] More checks on warnings/strictness in precedence ("met
From: |
Stefano Lattarini |
Subject: |
Re: [PATCH 12/10] More checks on warnings/strictness in precedence ("metawarnings"). |
Date: |
Sun, 2 Jan 2011 19:49:16 +0100 |
User-agent: |
KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) |
On Sunday 02 January 2011, Ralf Wildenhues wrote:
> * Stefano Lattarini wrote on Fri, Dec 24, 2010 at 09:21:56PM CET:
> > More checks on warnings/strictness in precedence ("metawarnings").
>
> metawarnings is not a proper word, how about just eliding the part in
> parentheses?
Done; I also removed the stray "in".
> Yes, I know I'm probably too picky on language; if it
> starts bothering you, I'll offer more beer when we should meet. ;-)
>
> > * tests/metawarnings-win-over-strictness.test: New test, similar
> > to `warnings-win-over-strictness.test', but with the explicit
> > warning levels being "meta-warnings" (like `-Wall' and `-Wnone').
>
> How about s/the explicit ...(\(.*\))/catch-all warning flags \1/
> and just naming the test warning-groups-win-over-strictness.test?
>
Fine with me. Done.
> > * tests/Makefile.am (TESTS): Update.
>
> > --- /dev/null
> > +++ b/tests/metawarnings-win-over-strictness.test
>
> > +# Check that, on the command line, explicitly-defined warning levels take
> > +# precedence over implicit strictness-implied warnings, even when these
> > +# explicit warning levels are "meta-warnings" (as `-Wall' and `-Wnone').
>
> see above
>
> > +# Since we are at it, throw in also *.am and *.m4 file inclusions.
>
> also throw in
>
Fixed.
> > +cat > configure.in << END
> > +AC_INIT([$me], [1.0])
> > +m4_include([am-init-automake.m4])
> > +AC_PROG_CC
> > +AC_CONFIG_FILES([Makefile])
> > +# Other similar tests do not use AC_OUTPUT, so we use it here,
> > +# for completness and for better coverage.
>
> completeness
>
Fixed.
> > +AC_OUTPUT
> > +END
> > +
> > +cat > Makefile.am <<END
> > +include automake-options.am
> > +FOO := bar
> > +END
> > +
> > +: > automake-options.am
> > +echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
>
> double space
>
Fixed.
> I'm not sure it works to put AM_INIT_AUTOMAKE in an included macro.
>
Apparently it does, at least when only automake, aclocal and autoconf
are involved.
> We definitely have places in autotools somewhere that grep for it,
>
Ouch.
> but I don't know if any of those are relevant here.
>
I don't think so. The test works also with autoconf 2.62, BTW.
> > +$ACLOCAL --force
> > +AUTOMAKE_fails -Werror -Wall --foreign
> > +grep '^Makefile\.am:.*:=.*not portable' stderr
>
> $sleep or remove autom4te.cache here.
>
Oops, I tought that "$ACLOCAL --force" was enough, but now I see from the
output of "aclocal --help" that this is not the case :-(
Sorry for the noise.
> > +: > automake-options.am
> > +echo 'AM_INIT_AUTOMAKE([-Werror -Wnone gnu])' > am-init-automake.m4
> > +$ACLOCAL --force
> > +$AUTOMAKE
>
> Likewise here.
>
> You are not using command-line options here. Is that intended? If not,
> then it seems like the test description does not fully match the action.
>
Sorry, botched "copy & paste" of heading comment from other tests.
Fixed now.
> > +echo 'AUTOMAKE_OPTIONS = -Werror -Wnone gnits' > automake-options.am
> > +echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
> > +$ACLOCAL --force
> > +$AUTOMAKE
>
> trailing white space.
>
Fixed.
> OK with that addressed.
>
Below is what I squashed in.
Thanks,
Stefano
-*-*-
diff --git a/ChangeLog b/ChangeLog
index cc99395..e6871fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,9 @@
-2010-12-24 Stefano Lattarini <address@hidden>
+2011-01-02 Stefano Lattarini <address@hidden>
- More checks on warnings/strictness in precedence ("metawarnings").
- * tests/metawarnings-win-over-strictness.test: New test, similar
- to `warnings-win-over-strictness.test', but with the explicit
- warning levels being "meta-warnings" (like `-Wall' and `-Wnone').
+ More checks on warnings/strictness precedence.
+ * tests/warning-groups-win-over-strictness.test: New test, similar
+ to `warnings-win-over-strictness.test', but checking the explicit
+ catch-all warning flags (like `-Wall' and `-Wnone').
* tests/Makefile.am (TESTS): Update.
2010-12-20 Stefano Lattarini <address@hidden>
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5f899cb..97f7b21 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -939,7 +939,7 @@ warnings-override.test \
warnings-precedence.test \
warnopts.test \
warnings-win-over-strictness.test \
-metawarnings-win-over-strictness.test \
+warning-groups-win-over-strictness.test \
werror.test \
werror2.test \
werror3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 10ac060..c516fca 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1202,7 +1202,7 @@ warnings-override.test \
warnings-precedence.test \
warnopts.test \
warnings-win-over-strictness.test \
-metawarnings-win-over-strictness.test \
+warning-groups-win-over-strictness.test \
werror.test \
werror2.test \
werror3.test \
diff --git a/tests/metawarnings-win-over-strictness.test
b/tests/warning-groups-win-over-strictness.test
similarity index 74%
rename from tests/metawarnings-win-over-strictness.test
rename to tests/warning-groups-win-over-strictness.test
index 7b1daf2..d761b5d 100755
--- a/tests/metawarnings-win-over-strictness.test
+++ b/tests/warning-groups-win-over-strictness.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2011 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,10 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that, on the command line, explicitly-defined warning levels take
-# precedence over implicit strictness-implied warnings, even when these
-# explicit warning levels are "meta-warnings" (as `-Wall' and `-Wnone').
-# Since we are at it, throw in also *.am and *.m4 file inclusions.
+# Check that explicitly-defined warning levels take precedence over
+# implicit strictness-implied warnings, even when these explicit warning
+# levels are "catch-all warnings" (such as `-Wall' and `-Wnone').
+# Since we are at it, also throw in *.am and *.m4 file inclusions.
. ./defs || Exit 1
@@ -35,7 +35,7 @@ m4_include([am-init-automake.m4])
AC_PROG_CC
AC_CONFIG_FILES([Makefile])
# Other similar tests do not use AC_OUTPUT, so we use it here,
-# for completness and for better coverage.
+# for completeness and for better coverage.
AC_OUTPUT
END
@@ -44,20 +44,23 @@ include automake-options.am
FOO := bar
END
+rm -rf autom4te*.cache
: > automake-options.am
-echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
-$ACLOCAL --force
+echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
+$ACLOCAL
AUTOMAKE_fails -Werror -Wall --foreign
grep '^Makefile\.am:.*:=.*not portable' stderr
+rm -rf autom4te*.cache
: > automake-options.am
echo 'AM_INIT_AUTOMAKE([-Werror -Wnone gnu])' > am-init-automake.m4
-$ACLOCAL --force
+$ACLOCAL
$AUTOMAKE
+rm -rf autom4te*.cache
echo 'AUTOMAKE_OPTIONS = -Werror -Wnone gnits' > automake-options.am
echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
-$ACLOCAL --force
+$ACLOCAL
$AUTOMAKE
: