]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
torture.at: Insulate more tests from buggy third-party m4 files.
authorZack Weinberg <zackw@panix.com>
Sat, 28 Nov 2020 16:18:05 +0000 (11:18 -0500)
committerZack Weinberg <zackw@panix.com>
Mon, 30 Nov 2020 16:45:26 +0000 (11:45 -0500)
All tests that run autoreconf need to defend against the possibility
of aclocal not existing and/or barfing on bugs in third-party m4 files
installed on the build system.  Two of the “Missing auxiliary files”
tests were missing this defensive code.

 * tests/torture.at (Missing auxiliary files (install-sh))
   (Missing auxiliary files (foreign)): Prevent autoreconf from
   running aclocal.

tests/torture.at

index 46466f3442ad05952d9fd6969b9049a02dbbcc6d..70763ba12e59ab38f60fa1d0e636b4069b84b96e 100644 (file)
@@ -2029,12 +2029,15 @@ AT_CLEANUP
 AT_SETUP([Missing auxiliary files (install-sh)])
 AT_KEYWORDS([autoreconf])
 
-# Repeat all the above tests with a configure script that _doesn't_
-# need config.{sub,guess} but does need install-sh.
+# Same as "Missing auxiliary files (config.*)" except that the
+# configure script _doesn't_ need config.{sub,guess} but does need
+# install-sh.
 
-rm build-aux/config.guess
-rm build-aux/config.sub
-rmdir build-aux
+# Prevent autoreconf from running aclocal, which might not exist,
+# or could barf over warnings in third-party macro files.
+AT_DATA([aclocal.m4])
+ACLOCAL=true
+export ACLOCAL
 
 AT_DATA([configure.ac],
 [[AC_INIT([GNU foo], [1.0])
@@ -2043,8 +2046,9 @@ AC_PROG_INSTALL
 AC_OUTPUT
 ]])
 
-
 AT_CHECK_AUTOCONF
+
+# Both configure and autoreconf should detect the missing files.
 AT_CHECK_CONFIGURE([], [1], [ignore],
 [configure: error: cannot find required auxiliary files: install-sh
 ])
@@ -2079,6 +2083,12 @@ AT_KEYWORDS([autoreconf])
 # usage in some automake recipes, but which was broken in autoconf
 # beta 2.69d (see https://savannah.gnu.org/support/?110363).
 
+# Prevent autoreconf from running aclocal, which might not exist,
+# or could barf over warnings in third-party macro files.
+AT_DATA([aclocal.m4])
+ACLOCAL=true
+export ACLOCAL
+
 AT_DATA([configure.ac],
 [[AC_INIT([GNU foo], [1.0])
 AC_CONFIG_AUX_DIR([build-aux])