From: Stefano Lattarini Date: Fri, 4 Nov 2011 11:15:33 +0000 (+0100) Subject: tests: extend tests on 'extra-portability' warning category X-Git-Tag: ng-0.5a~98^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f23d5a15269c722c8cd136827a3b021a29814cb0;p=thirdparty%2Fautomake.git tests: extend tests on 'extra-portability' warning category * tests/extra-portability.test: Redefine `$AUTOMAKE' to ensure we have complete control over the automake options. Extend by using also a setup where no `portability' warning is present (only an `extra-portability' warning is). Other minor extensions. Remove some redundant, verbose comments about the expected diagnostic. --- diff --git a/ChangeLog b/ChangeLog index 06887360c..0629e5fab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2011-11-04 Stefano Lattarini + + tests: extend tests on 'extra-portability' warning category + * tests/extra-portability.test: Redefine `$AUTOMAKE' to ensure we + have complete control over the automake options. Extend by using + also a setup where no `portability' warning is present (only an + `extra-portability' warning is). Other minor extensions. Remove + some redundant, verbose comments about the expected diagnostic. + 2011-11-03 Stefano Lattarini tests: various minor tweakings, mostly related to AM_PROG_AR diff --git a/tests/extra-portability.test b/tests/extra-portability.test index 191dcb493..51a9b4f3c 100755 --- a/tests/extra-portability.test +++ b/tests/extra-portability.test @@ -18,52 +18,78 @@ # warning categories: # 1. `-Wextra-portability' must imply `-Wportability'. # 2. `-Wno-portability' must imply `-Wno-extra-portability'. +# 3. `-Wall' must imply `-Wextra-portability'. . ./defs || Exit 1 set -e +# We want (almost) complete control over automake options. +# FIXME: use $original_AUTOMAKE here once we are merged into master. +AUTOMAKE="`(set $AUTOMAKE && echo $1)` --foreign -Werror" + cat >>configure.in <Makefile.am <> Makefile.am + +# Enabling extra-portability enables portability as well ... +AUTOMAKE_fails -Wextra-portability +grep 'requires.*AM_PROG_CC_C_O' stderr +grep 'requires.*AM_PROG_AR' stderr +# ... even if it had been previously disabled. +AUTOMAKE_fails -Wno-portability -Wextra-portability grep 'requires.*AM_PROG_CC_C_O' stderr grep 'requires.*AM_PROG_AR' stderr # Disabling extra-portability leaves portability intact. -AUTOMAKE_fails -Wno-extra-portability -# The expected diagnostic is -# Makefile.am:2: compiling `foo.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.in' -# Makefile.am:1: while processing library `libfoo.a' +AUTOMAKE_fails -Wportability -Wno-extra-portability grep 'requires.*AM_PROG_CC_C_O' stderr grep 'requires.*AM_PROG_AR' stderr && Exit 1 # Enabling portability does not enable extra-portability. AUTOMAKE_fails -Wnone -Wportability -# The expected diagnostic is -# Makefile.am:2: compiling `foo.c' with per-target flags requires `AM_PROG_CC_C_O' in `configure.in' -# Makefile.am:1: while processing library `libfoo.a' grep 'requires.*AM_PROG_CC_C_O' stderr grep 'requires.*AM_PROG_AR' stderr && Exit 1 # Disabling portability disables extra-portability. $AUTOMAKE -Wno-portability +$AUTOMAKE -Wextra-portability -Wno-portability +$AUTOMAKE -Wall -Wno-portability :