]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/torture.at (Deep Package): New test.
authorAkim Demaille <akim@epita.fr>
Tue, 29 Oct 2002 08:09:40 +0000 (08:09 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 29 Oct 2002 08:09:40 +0000 (08:09 +0000)
(Configuring subdirectories): Don't use a testSubDir as Autotest
now does it itself.

ChangeLog
tests/torture.at

index 1b7f9b6e8be541c0f907799567b6ec5e68c704ff..1591a0928571ce05a9cba33b528680e8320651a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-10-29  Akim Demaille  <akim@epita.fr>
+
+       * 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  <akim@epita.fr>
 
        * bin/autoreconf.in (&parse_args, $help): Support --warnings.
index 1eae31166780f67804d0191848f283d43688aeac..968953be7fff8a72eb7242ee668effe084f92b7f 100644 (file)
@@ -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