automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 12/10] More checks on warnings/strictness in precedence ("metawar


From: Stefano Lattarini
Subject: [PATCH 12/10] More checks on warnings/strictness in precedence ("metawarnings").
Date: Fri, 24 Dec 2010 21:21:56 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

And this further test coverage won't hurt IMHO.

Now this should really be the last patch of the series (barring
minor "cleaning" follow-ups).

Regards,
   Stefano

-*-*-*-

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').
* tests/Makefile.am (TESTS): Update.
---
 ChangeLog                                   |    8 +++
 tests/Makefile.am                           |    1 +
 tests/Makefile.in                           |    1 +
 tests/metawarnings-win-over-strictness.test |   63 +++++++++++++++++++++++++++
 4 files changed, 73 insertions(+), 0 deletions(-)
 create mode 100755 tests/metawarnings-win-over-strictness.test

diff --git a/ChangeLog b/ChangeLog
index c952446..8220fcb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-12-24  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').
+       * tests/Makefile.am (TESTS): Update.
+
 2010-12-20  Stefano Lattarini  <address@hidden>
 
        Update NEWS about the warnings-over-strictness precedence.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3ced8e5..3605cf7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -932,6 +932,7 @@ warnings-overriding.test \
 warnings-precedence.test \
 warnopts.test \
 warnings-win-over-strictness.test \
+metawarnings-win-over-strictness.test \
 werror.test \
 werror2.test \
 werror3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index cec24e4..12ad09b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1195,6 +1195,7 @@ warnings-overriding.test \
 warnings-precedence.test \
 warnopts.test \
 warnings-win-over-strictness.test \
+metawarnings-win-over-strictness.test \
 werror.test \
 werror2.test \
 werror3.test \
diff --git a/tests/metawarnings-win-over-strictness.test 
b/tests/metawarnings-win-over-strictness.test
new file mode 100755
index 0000000..1dee78d
--- /dev/null
+++ b/tests/metawarnings-win-over-strictness.test
@@ -0,0 +1,63 @@
+#! /bin/sh
+# Copyright (C) 2010 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# 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.
+
+. ./defs || Exit 1
+
+set -e
+
+# We want complete control over automake options.
+AUTOMAKE=$original_AUTOMAKE
+
+# Files required in gnu and/or gnits strictness.
+touch README INSTALL NEWS AUTHORS ChangeLog COPYING THANKS
+
+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.
+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
+$ACLOCAL --force
+AUTOMAKE_fails -Werror -Wall --foreign
+grep '^Makefile\.am:.*:=.*not portable' stderr
+
+: > automake-options.am
+echo 'AM_INIT_AUTOMAKE([-Werror -Wnone gnu])' > am-init-automake.m4
+$ACLOCAL --force
+$AUTOMAKE
+
+echo 'AUTOMAKE_OPTIONS = -Werror -Wnone gnits' > automake-options.am
+echo 'AM_INIT_AUTOMAKE' > am-init-automake.m4
+$ACLOCAL --force
+$AUTOMAKE 
+
+:
-- 
1.7.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]