diff options
Diffstat (limited to 'tests/local.at')
-rw-r--r-- | tests/local.at | 52 |
1 files changed, 29 insertions, 23 deletions
diff --git a/tests/local.at b/tests/local.at index a875b5e0..3424bd6a 100644 --- a/tests/local.at +++ b/tests/local.at @@ -137,6 +137,7 @@ m4_case([$4], [], [], [ignore], [], s/: C\(annot open \)\([^`:]*\):/: c\1`\2'\'':/ s/: include:\( cannot open\)/:\1/ s/^autom4te: [^ ]*m4[.ex]* /autom4te: m4 / + s/^autom4te: error: [^ ]*m4[.ex]* /autom4te: error: m4 / s!^.*/\([^/][^/]*\)\.m4: *[0-9][0-9]*: *!\1.m4: ! s!^.*/\([^/][^/]*\)\.m4: *[0-9][0-9]*: *[0-9][0-9]*: *!\1.m4: ! s/ (E[A-Z]*)$// @@ -508,39 +509,37 @@ dnl pacify editors that don't understand sh case: (( ]) -# _AT_CHECK_AC_MACRO(AC-BODY, PRE-TESTS) +# _AT_CHECK_AC_MACRO(AC-BODY, PRE-TESTS, [AUTOCONF-FLAGS]) # -------------------------------------- # Create a minimalist configure.ac running the macro named # NAME-OF-THE-MACRO, check that autoconf runs on that script, -# and that the shell runs correctly the configure. +# and that the generated configure script runs without error. m4_define([_AT_CHECK_AC_MACRO], [AT_CONFIGURE_AC([$1]) $2 -AT_CHECK_AUTOCONF -AT_CHECK_AUTOHEADER([], [ignore]) +AT_CHECK_AUTOCONF([$3]) +AT_CHECK_AUTOHEADER([$3], [ignore]) AT_CHECK_CONFIGURE AT_CHECK_ENV ])# _AT_CHECK_AC_MACRO # AT_CHECK_MACRO(MACRO, [MACRO-USE], [ADDITIONAL-CMDS], -# [AUTOCONF-FLAGS = -W obsolete]) +# [AUTOCONF-FLAGS]) # ----------------------------------------------------- # Create a minimalist configure.ac running the macro named # NAME-OF-THE-MACRO, check that autoconf runs on that script, -# and that the shell runs correctly the configure. +# and that the generated configure script runs without error. # # We run `configure' twice, both times with a cache, and compare # the environment after each run to detect inconsistencies. -# -# New macros are not expected to depend upon obsolete macros. m4_define([AT_CHECK_MACRO], [AT_SETUP([$1]) AT_CONFIGURE_AC([m4_default([$2], [$1])]) -AT_CHECK_AUTOCONF([m4_default([$4], [-W obsolete])]) -AT_CHECK_AUTOHEADER([], [ignore]) +AT_CHECK_AUTOCONF([$4]) +AT_CHECK_AUTOHEADER([$4], [ignore]) for at_run in r1 r2 do @@ -562,7 +561,7 @@ AT_CLEANUP[]dnl # AT_CHECK_MACRO_CROSS(MACRO, [MACRO-USE], [ADDITIONAL-CMDS], -# [AUTOCONF-FLAGS = -W obsolete]) +# [AUTOCONF-FLAGS]) # ----------------------------------------------------------- # Like the previous one, but creates two checks: for native # compile and for cross-compile. @@ -581,22 +580,29 @@ AT_CHECK_MACRO([$1 (cross compile)], # AT_CHECK_AU_MACRO(MACRO) # ------------------------ # Create a minimalist configure.ac running the macro named -# NAME-OF-THE-MACRO, autoupdate this script, check that autoconf runs -# on that script, and that the shell runs correctly the configure. -# -# Updated configure.ac shall not depend upon obsolete macros, which votes -# in favor of `-W obsolete', but since many of these macros leave a message -# to be removed by the user once her code is adjusted, let's not check. -# -# Remove config.hin to avoid `autoheader: config.hin is unchanged'. +# NAME-OF-THE-MACRO, check that autoconf runs on that script, +# and that the generated configure script runs without error. +# +# Then run autoupdate on that script, and check that NAME-OF-THE-MACRO +# no longer appears in configure.ac, autoconf runs on the updated +# script, the configure script still runs without error, and the +# result is unchanged. +# +# On the first pass, check for a -Wobsolete warning naming +# NAME-OF-THE-MACRO. On the second pass, *don't* check for the +# absence of -Wobsolete warnings, because many of autoupdate's edits +# leave the configure.ac author with some manual work to do, and +# indicate this by inserting an AC_DIAGNOSE message to be removed +# after the manual work is complete. m4_define([AT_CHECK_AU_MACRO], [AT_SETUP([$1]) AT_KEYWORDS([autoupdate]) AT_CONFIGURE_AC([$1]) -AT_CHECK_AUTOCONF -AT_CHECK_AUTOHEADER([], [ignore]) +AT_CHECK_AUTOCONF([], 0, [], [stderr]) +AT_CHECK([grep 'macro .$1. is obsolete' stderr], 0, [ignore], [ignore]) +AT_CHECK_AUTOHEADER([-Wno-obsolete], [ignore]) AT_CHECK_CONFIGURE AT_CHECK_ENV @@ -604,8 +610,8 @@ rm config.hin AT_CHECK_AUTOUPDATE([], 0, [], ignore) AT_CHECK([grep '^$1$' configure.ac], 1) -AT_CHECK_AUTOCONF -AT_CHECK_AUTOHEADER([], [ignore]) +AT_CHECK_AUTOCONF([-Wno-obsolete]) +AT_CHECK_AUTOHEADER([-Wno-obsolete], [ignore]) AT_CHECK_CONFIGURE AT_CHECK_ENV |