From: Ralf Wildenhues Date: Tue, 5 Dec 2006 21:08:50 +0000 (+0000) Subject: * tests/tools.at (autom4te preselections): New test, to flag X-Git-Tag: AUTOCONF-2.61a~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b40bccee3aa96e6e4f2cce49daeea95aadb111b1;p=thirdparty%2Fautoconf.git * tests/tools.at (autom4te preselections): New test, to flag entries missing from autom4te.cfg. Report by David Byron . --- diff --git a/ChangeLog b/ChangeLog index 641bdd4a..90160663 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-12-05 Ralf Wildenhues + * tests/tools.at (autom4te preselections): New test, to flag + entries missing from autom4te.cfg. + Report by David Byron . + * tests/torture.at (Substitute a 2000-byte string): Actually use AC_PROG_AWK, so the last change works as intended. (Substitute and define special characters): Likewise. diff --git a/tests/tools.at b/tests/tools.at index 23548dfd..f1b1d039 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -827,3 +827,50 @@ AT_CHECK([aclocal -I m4], [0], [ignore], [ignore]) AT_CHECK_AUTOUPDATE AT_CLEANUP + + +# Keeping autom4te.cfg complete +# ----------------------------- + +AT_SETUP([autom4te preselections]) +: ${sleep='sleep 1'} # Command to force different time stamps. +# If this test should run on FAT file systems and older w32, +# then setting $sleep correctly needs to be revisited. + +# We use aclocal and automake. +AT_CHECK([automake --version || exit 77], [], [ignore], [ignore]) +AT_CHECK([test ! -f $HOME/.autom4te.cfg || exit 77], [], [ignore], [ignore]) + +AT_DATA([configure.in], +[[AC_INIT(GNU foo, 1.0) +AM_INIT_AUTOMAKE +AC_CONFIG_FILES([Makefile]) +AC_OUTPUT +]]) + +AT_DATA([Makefile.am], +[[AUTOMAKE_OPTIONS = foreign +]]) + +$sleep # `aclocal.m4' should be strictly younger than its inputs + +# If Autoconf is too old, or the user has turned caching off, skip: +AT_CHECK([aclocal || { ret=$?; test $ret -eq 63 && ret=77; exit $ret; }], + [], [], [ignore]) +AT_CHECK([test -d autom4te.cache || exit 77]) +AT_CHECK([autoconf]) + +# If this test fails due to missing entries in lib/autom4te.in, then +# comparing the old and new requests is a good place to start debugging: +cp autom4te.cache/requests old-requests +$sleep # need to make sure the stamp file is strictly newer. +echo newer >newer +$sleep # if `configure' is regenerated, we want it to be strictly newer, + # to catch the error consistently. +AT_CHECK([aclocal], [], [], [ignore]) +AT_CHECK([automake --no-force --add-missing], [], [], [ignore]) +AT_CHECK([autoconf]) +AT_CHECK([set x `ls -1t newer configure`; test "$2" = newer || + { diff old-requests autom4te.cache/requests; exit 1; }]) + +AT_CLEANUP