]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Address “autom4te preselections” testsuite failure
authorZack Weinberg <zack@owlfolio.org>
Fri, 22 Dec 2023 14:48:30 +0000 (09:48 -0500)
committerZack Weinberg <zack@owlfolio.org>
Fri, 22 Dec 2023 14:48:30 +0000 (09:48 -0500)
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.

tests/tools.at

index 7209ba9065b49758a9b67bd3f03894a086dd3a98..703d0ffec4b62573f06e70d2156d82627de51c9a 100644 (file)
@@ -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`" = "" ||