diff options
author | Zack Weinberg <zackw@panix.com> | 2020-09-21 16:59:46 -0400 |
---|---|---|
committer | Zack Weinberg <zackw@panix.com> | 2020-09-22 15:46:43 -0400 |
commit | 218cc1e49224765788aa368fe4a2e27c6652df5d (patch) | |
tree | 222b0f2225dfbd01f2e09e9657657cb3b932db28 /tests | |
parent | 53f18e7889ef1a64bb9273cc8a81e750d78a6333 (diff) | |
download | autoconf-218cc1e49224765788aa368fe4a2e27c6652df5d.tar.gz |
Disable all warnings when running autoconf as a subprocess.
autoheader and autoscan both run autoconf in trace mode, and
autoheader makes a point of passing down the warnings options.
This means autoheader prints warnings that a regular invocation
of autoconf would also print, so in the common case where both
are being run by autoreconf, the warnings are duplicated.
autoscan doesn’t pass down warnings options but it _does_ leave
the WARNINGS environment variable alone, which means it may issue
completely spurious warnings because the configure script is still
under construction.
Change this so that both programs disable all warnings for the
subsidiary invocation of autoconf, by not passing any warnings
options themselves, and by setting the WARNINGS environment variable
to “none” for the subprocess. For this to work correctly, the
‘args: --warnings syntax’ line has to be removed from autom4te.cfg
(m4sugar section). Since syntax warnings are on by default anyway,
the sole effect of this is to allow WARNINGS=none to turn off syntax
warnings.
The test suite changes are all to remove expectations of duplicate
diagnostics from autoheader.
* bin/autoheader.in: Do not pass warnings options down to subsidiary
autoconf, and set WARNINGS=none in the environment for that process.
* bin/autoscan.in: Set WARNINGS=none in the environment for subsidiary
autoconf.
* lib/autom4te.in (M4sugar): Remove ‘--warnings syntax’.
* tests/semantics.at, tests/torture.at: No longer expect various
diagnostics from autoheader as well as autoconf.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/semantics.at | 14 | ||||
-rw-r--r-- | tests/torture.at | 12 |
2 files changed, 3 insertions, 23 deletions
diff --git a/tests/semantics.at b/tests/semantics.at index e7dd7c5a..ab3cea7c 100644 --- a/tests/semantics.at +++ b/tests/semantics.at @@ -214,11 +214,7 @@ AT_CHECK_AUTOHEADER([], [ HAVE_FOPEN HAVE_FPRINTF HAVE_PRINTF -], [], [], -[[configure.ac:9: warning: AC_REPLACE_FUNCS($funcs): you should use literals -functions.m4: AC_REPLACE_FUNCS is expanded from... -configure.ac:9: the top level -]]) +]) AT_CHECK_CONFIGURE AT_CHECK_ENV AT_CHECK_DEFINES( @@ -873,10 +869,6 @@ AT_CHECK_AUTOHEADER([-W no-obsolete], [ HAVE_FN_FOO HAVE_FN_NOCOMMENT HAVE_FN_QUUX -], [], [], -[configure.ac:8: warning: $1($fns): you should use literals -functions.m4: $1 is expanded from... -configure.ac:8: the top level ]) AT_CHECK_CONFIGURE AT_CLEANUP @@ -956,10 +948,6 @@ AT_CHECK_AUTOHEADER([-W no-obsolete], [ HAVE_SYS_TYPES_H HAVE_UNISTD_H STDC_HEADERS -], [], [], -[configure.ac:8: warning: $1($hs): you should use literals -headers.m4: $1 is expanded from... -configure.ac:8: the top level ]) AT_CHECK_CONFIGURE AT_CLEANUP diff --git a/tests/torture.at b/tests/torture.at index 5c61027c..82706d34 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -1071,11 +1071,7 @@ AT_CHECK([[sed '/trailer\.m4:/d; s/^configure\.ac:[45]: //' stderr]], [], [[warning: AC_DEFINE: `one two' is not a valid preprocessor define value ]]) -AT_CHECK_AUTOHEADER([], [foo], [], [], [stderr]) -AT_CHECK([[sed 's/^configure\.ac:[45]: //' stderr]], [], -[[warning: AC_DEFINE: `one -two' is not a valid preprocessor define value -]]) +AT_CHECK_AUTOHEADER([], [foo]) AT_CHECK_CONFIGURE AT_CHECK_DEFINES([[#define foo one ]]) @@ -1090,11 +1086,7 @@ AT_CHECK([[sed '/trailer.m4:/d; s/^configure\.ac:[45]: //' stderr]], [], [[warning: AC_DEFINE_UNQUOTED: `one two' is not a valid preprocessor define value ]]) -AT_CHECK_AUTOHEADER([], [foo], [], [], [stderr]) -AT_CHECK([[sed 's/^configure\.ac:[45]: //' stderr]], [], -[[warning: AC_DEFINE_UNQUOTED: `one -two' is not a valid preprocessor define value -]]) +AT_CHECK_AUTOHEADER([], [foo]) AT_CHECK_CONFIGURE AT_CHECK_DEFINES([[#define foo one ]]) |