From: Akim Demaille Date: Tue, 29 Oct 2002 08:09:40 +0000 (+0000) Subject: * tests/torture.at (Deep Package): New test. X-Git-Tag: AUTOCONF-2.54c~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e69ce16623c02cfc1bc4f1d11b71bc50767fc612;p=thirdparty%2Fautoconf.git * tests/torture.at (Deep Package): New test. (Configuring subdirectories): Don't use a testSubDir as Autotest now does it itself. --- diff --git a/ChangeLog b/ChangeLog index 1b7f9b6e8..1591a0928 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-10-29 Akim Demaille + + * tests/torture.at (Deep Package): New test. + (Configuring subdirectories): Don't use a testSubDir as Autotest + now does it itself. + 2002-10-29 Akim Demaille * bin/autoreconf.in (&parse_args, $help): Support --warnings. diff --git a/tests/torture.at b/tests/torture.at index 1eae31166..968953be7 100644 --- a/tests/torture.at +++ b/tests/torture.at @@ -561,18 +561,6 @@ AT_KEYWORDS(autoreconf) # We use aclocal (via autoreconf). AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) -# Move into a fresh testSubDir. But Autotest is not ready for such -# tricks, albeit most useful :( It expects to find its files -# (at-setup-line and so on) in the original `.', and it will complain -# not to find even one. So just run mkdir as if it were a test. This -# will create at-setup-line blah blah, and Autotest will leave us in -# peace. -# -# FIXME: The more I think about it, the more I am tempted to *always* -# have test groups run in a subdir, a` la Automake. -AT_CHECK([AS_MKDIR_P([testSubDir])]) -cd testSubDir - # The contents of `inner/', and `inner/innermost/'. AS_MKDIR_P([inner/innermost]) @@ -580,7 +568,7 @@ AS_MKDIR_P([inner/innermost]) # be compatible with Automake 1.4: aclocal (run by autoreconf) would # die because it can't find configure.in. AT_DATA([inner/configure.in], -[AC_INIT(GNU Inner, 1.0) +[[AC_INIT(GNU Inner, 1.0) AC_CONFIG_SRCDIR([innermost/config.in]) AC_ARG_VAR([INNER], [an inner variable]) AC_SUBST([INNER]) @@ -589,7 +577,7 @@ if test "x$INNER" = x; then fi AC_CONFIG_FILES([innermost/config]) AC_OUTPUT -]) +]]) AT_DATA([inner/innermost/config.in], [INNER=@INNER@ @@ -603,14 +591,14 @@ AT_DATA([install-sh], []) # nonexistent is allowed not to exist. AT_DATA([configure.in], -[AC_INIT(GNU Outer, 1.0) +[[AC_INIT(GNU Outer, 1.0) AC_ARG_VAR([OUTER], [an outer variable]) if false; then AC_CONFIG_SUBDIRS([nonexistent]) fi AC_CONFIG_SUBDIRS([inner]) AC_OUTPUT -]) +]]) AT_CHECK([autoreconf]) AT_CHECK([test -f inner/configure]) @@ -652,3 +640,67 @@ prefix=/good ]) AT_CLEANUP + + + +## -------------- ## +## Deep Package. ## +## -------------- ## + +AT_SETUP([Deep Package]) +AT_KEYWORDS(autoreconf) + +# We use aclocal (via autoreconf). +AT_CHECK([aclocal --version || exit 77], [], [ignore], [ignore]) + +# The contents of `.' +AT_DATA([install-sh], []) +AT_DATA([configure.in], +[[AC_INIT(GNU Outer, 1.0) +AC_ARG_VAR([OUTER], [an outer variable]) +AC_CONFIG_SUBDIRS([inner]) +AC_OUTPUT +]]) + +# The contents of `inner/', and `inner/innermost/'. +AS_MKDIR_P([inner/innermost]) + +AT_DATA([inner/configure.ac], +[[AC_INIT(GNU Inner, 1.0) +AC_ARG_VAR([INNER], [an inner variable]) +AC_CONFIG_SUBDIRS(innermost) +AC_OUTPUT +]]) + +AT_DATA([inner/innermost/configure.ac], +[[AC_INIT(GNU Innermost, 1.0) +AC_ARG_VAR([INNERMOST], [an innermost variable]) +AC_CONFIG_HEADERS(config.h:config.hin) +AC_DEFINE_UNQUOTED([INNERMOST], [$INNERMOST], [an innermost variable]) +AC_OUTPUT +]]) + +AT_CHECK([autoreconf -Wall -v], [0], [ignore], [ignore]) +AT_CHECK([test -f inner/configure]) +AT_CHECK([test -f inner/innermost/configure]) +AT_CHECK([test -f inner/innermost/config.hin]) + +# Running the outer configure recursively should provide the innermost +# help strings. +AT_CHECK([./configure --help=recursive | grep -w INNER], 0, [ignore]) +AT_CHECK([./configure --help=recursive | grep -w INNERMOST], 0, [ignore]) + +# Running the outer configure should trigger the inner. +AT_CHECK_CONFIGURE([INNERMOST=tsomrenni]) +AT_CHECK([grep INNERMOST inner/innermost/config.h], 0, +[[#define INNERMOST tsomrenni +]]) + +# The same, but from a builddir. +AS_MKDIR_P([builddir]) +AT_CHECK([cd builddir && ../configure INNERMOST=build/tsomrenni], 0, [ignore]) +AT_CHECK([grep INNERMOST builddir/inner/innermost/config.h], 0, +[[#define INNERMOST build/tsomrenni +]]) + +AT_CLEANUP