summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2020-11-28 11:18:05 -0500
committerZack Weinberg <zackw@panix.com>2020-11-30 11:45:26 -0500
commit03f14a90f191c0e77b873e2e6778bc8cccac51b3 (patch)
tree22677f11403890badaae0e0519dc8938442e4034
parent623ec9a0d1800f827f5167f2075bf7dc2342463c (diff)
downloadautoconf-03f14a90f191c0e77b873e2e6778bc8cccac51b3.tar.gz
torture.at: Insulate more tests from buggy third-party m4 files.
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.
-rw-r--r--tests/torture.at22
1 files changed, 16 insertions, 6 deletions
diff --git a/tests/torture.at b/tests/torture.at
index 46466f34..70763ba1 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -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])