From: Zack Weinberg Date: Sat, 28 Nov 2020 16:18:05 +0000 (-0500) Subject: torture.at: Insulate more tests from buggy third-party m4 files. X-Git-Tag: v2.69e~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=03f14a90f191c0e77b873e2e6778bc8cccac51b3;p=thirdparty%2Fautoconf.git 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. --- 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])