From: Zack Weinberg Date: Fri, 22 Dec 2023 14:48:30 +0000 (-0500) Subject: Address “autom4te preselections” testsuite failure X-Git-Tag: v2.72~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8794cd1c2562db08cbc3ff569791e4e1db4d56f7;p=thirdparty%2Fautoconf.git Address “autom4te preselections” testsuite failure This test failure has the same root cause as described in commit 3fbfb13e7a846e98fa931b2bce373b5b2364a11b: autom4te regenerates the output unexpectedly because the output has the *same* file modification timestamp as the cache file it was generated from. Apply the same stopgap fix. * tests/tools.at (autom4te preselections): Immediately after running autoconf the first time, delay and then touch configure. Move the “echo newer > newer” line after the comment that explains what it’s for. Insert additional blank lines for readability. --- diff --git a/tests/tools.at b/tests/tools.at index 7209ba906..703d0ffec 100644 --- a/tests/tools.at +++ b/tests/tools.at @@ -1521,14 +1521,23 @@ AT_CHECK([$ACLOCAL || { ret=$?; test $ret -eq 63 && ret=77; exit $ret; }], AT_CHECK([test -d autom4te.cache || exit 77]) AT_CHECK([autoconf]) +# On a file system with coarse timestamp resolution (1 or 2s), +# configure and autom4te's cache files can easily have equal +# timestamps, in which case autom4te will consider the cache +# to be stale. Ensure configure's timestamp is newer. +AT_MTIME_DELAY +touch configure + # 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: sort autom4te.cache/requests >old-requests -echo newer >newer + # if 'configure' is regenerated, we want it to be strictly newer, # to catch the error consistently. +echo newer >newer AT_MTIME_DELAY -AT_CHECK([$ACLOCAL], [],[], [ignore]) + +AT_CHECK([$ACLOCAL], [], [], [ignore]) AT_CHECK([automake --no-force --add-missing], [], [], [ignore]) AT_CHECK([autoconf]) AT_CHECK([test "`find configure -newer newer`" = "" ||