From: Stefano Lattarini Date: Thu, 13 Jan 2011 22:57:16 +0000 (+0100) Subject: More tests on warnings and strictness. X-Git-Tag: ng-0.5a~248^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b638d1355fa5e685e0011196247b81a875dbe523;p=thirdparty%2Fautomake.git More tests on warnings and strictness. * tests/warnings-strictness-interactions.test: New test. * tests/warnings-unknown.test: Likewise. * tests/Makefile.am (TESTS): Update. --- diff --git a/ChangeLog b/ChangeLog index d30523d61..9130140af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2011-01-15 Stefano Lattarini + More tests on warnings and strictness. + * tests/warnings-strictness-interactions.test: New test. + * tests/warnings-unknown.test: Likewise. + * tests/Makefile.am (TESTS): Update. + New test on silent-rules mode and portability warnings. * tests/silent-nowarn.test: New test. * tests/Makefile.am (TESTS): Update. diff --git a/tests/Makefile.am b/tests/Makefile.am index 53dbe9cc6..972f8a9bc 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -947,6 +947,8 @@ vtexi3.test \ vtexi4.test \ warnings-override.test \ warnings-precedence.test \ +warnings-strictness-interactions.test \ +warnings-unknown.test \ warnopts.test \ werror.test \ werror2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index f2d695fc2..282afe070 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1210,6 +1210,8 @@ vtexi3.test \ vtexi4.test \ warnings-override.test \ warnings-precedence.test \ +warnings-strictness-interactions.test \ +warnings-unknown.test \ warnopts.test \ werror.test \ werror2.test \ diff --git a/tests/warnings-strictness-interactions.test b/tests/warnings-strictness-interactions.test new file mode 100755 index 000000000..e2c767532 --- /dev/null +++ b/tests/warnings-strictness-interactions.test @@ -0,0 +1,59 @@ +#! /bin/sh +# 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 +# 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 . + +# Check that the default warnings triggered by a strictness specified +# in AUTOMAKE_OPTIONS take precedence over explicit warnings given in +# AM_INIT_AUTOMAKE. + +. ./defs || Exit 1 + +# We want (almost) complete control over automake options. +AUTOMAKE="$original_AUTOMAKE -Werror" + +cat > Makefile.am <$2-t -e "s|^\\(AUTOMAKE_OPTIONS\\) *=.*|\\1 = $1|" \ + -e "s|^\\(AM_INIT_AUTOMAKE\\).*|\\1([$1])|" + mv -f $2-t $2 + set -x + cat $2 +} + +set_am_opts '-Wportability' configure.in +set_am_opts 'foreign' Makefile.am + +$ACLOCAL +$AUTOMAKE + +rm -rf autom4te*.cache + +# Files required in gnu strictness. +touch README INSTALL NEWS AUTHORS ChangeLog COPYING + +set_am_opts '-Wno-portability' configure.in +set_am_opts 'gnu' Makefile.am + +AUTOMAKE_fails +$ACLOCAL +grep '^Makefile\.am:2:.*:=.*not portable' stderr + +: diff --git a/tests/warnings-unknown.test b/tests/warnings-unknown.test new file mode 100755 index 000000000..77ed589d7 --- /dev/null +++ b/tests/warnings-unknown.test @@ -0,0 +1,44 @@ +#! /bin/sh +# 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 +# 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 . + +# Check that automake complains about unknown warnings. + +. ./defs || Exit 1 + +# We want (almost) complete control over automake options. +AUTOMAKE="$original_AUTOMAKE --foreign -Werror" + +cat > configure.in < Makefile.am <