]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
testsuite: pass $configure_options to configure invocations.
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 13 Sep 2009 16:03:31 +0000 (18:03 +0200)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Mon, 14 Sep 2009 17:30:22 +0000 (19:30 +0200)
* tests/local.at (AT_CHECK_CONFIGURE): Add $configure_options
to configure command line.
* tests/autotest.at, tests/base.at, tests/c.at, tests/torture.at:
Likewise for each configure invocation.
* README-hacking: Document configure_options.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
ChangeLog
README-hacking
tests/autotest.at
tests/base.at
tests/c.at
tests/local.at
tests/torture.at

index 60a4daaaaae215022f30d1c0eb3796de930490bf..7faf75901c56b63020abcf12371a5817f544e9be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-09-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       testsuite: pass $configure_options to configure invocations.
+       * tests/local.at (AT_CHECK_CONFIGURE): Add $configure_options
+       to configure command line.
+       * tests/autotest.at, tests/base.at, tests/c.at, tests/torture.at:
+       Likewise for each configure invocation.
+       * README-hacking: Document configure_options.
+
        testsuite: improve Erlang tests portability, overridability.
        * tests/autotest.at (Erlang Eunit unit tests): Use "no" as
        value-if-not-found for Erlang tools.
index fc96a867a45dcc07702e994cd1afdcc206f08238..e985f0b50fbca4057016696d9adfddc9766c747c 100644 (file)
@@ -96,6 +96,11 @@ keyword as well as test 10:
 
   $ make check TESTSUITEFLAGS='10 -k m4sugar'
 
+You can pass options to configure scripts invoked by the testsuite by
+setting the configure_options variable:
+
+  $ make check TESTSUITEFLAGS='configure_options="CC=gcc-2.95"'
+
 * Submitting patches
 
 All patches should be submitted to <autoconf-patches@gnu.org> for
index 8b0a6c25ea88331d703db6b88bfc5b5eab0942c8..b95d9ee7ce0a9c3a5f5bce2d06f43dfe281285e7 100644 (file)
@@ -1339,7 +1339,7 @@ AT_CLEANUP
 
 # Build directory totally outside source directory.
 cd vpath-outside
-AT_CHECK([../pkg/configure], [0], [ignore])
+AT_CHECK([../pkg/configure $configure_options], [0], [ignore])
 cd t
 AT_CHECK([../../pkg/t/suite], [0], [ignore])
 cd ../..
@@ -1347,20 +1347,20 @@ cd ../..
 # Build directory totally outside source directory (absolute).
 my_srcdir=`pwd`/pkg
 cd vpath-abs
-AT_CHECK(["$my_srcdir"/configure], [0], [ignore])
+AT_CHECK(["$my_srcdir"/configure $configure_options], [0], [ignore])
 cd t
 AT_CHECK(["$my_srcdir"/t/suite], [0], [ignore])
 cd ../..
 
 # Build directory as subdirectory of source directory.
 cd pkg/vpath-inside
-AT_CHECK([../configure], [0], [ignore])
+AT_CHECK([../configure $configure_options], [0], [ignore])
 cd t
 AT_CHECK([../../t/suite], [0], [ignore])
 cd ../../..
 
 # Build directory as parent of source directory.
-AT_CHECK([pkg/configure], [0], [ignore])
+AT_CHECK([pkg/configure $configure_options], [0], [ignore])
 cd t
 AT_CHECK([../pkg/t/suite], [0], [ignore])
 cd ..
index 21a2c8285c4718de29a84438d947ddb3d43e3425..5929927d7075888a58c24dd576fb8af0884ef990 100644 (file)
@@ -297,9 +297,9 @@ AT_DATA([configure.ac],
 cat <&AS@&t@_ORIGINAL_STDIN_FD >&AS@&t@_MESSAGE_FD
 ]])
 AT_CHECK_AUTOCONF
-AT_CHECK([echo Hello | CONFIG_SITE=/dev/null ./configure | grep -v 'configure: loading site script '],, [Hello
+AT_CHECK([echo Hello | CONFIG_SITE=/dev/null ./configure $configure_options | grep -v 'configure: loading site script '],, [Hello
 ])
-AT_CHECK([echo Hello | CONFIG_SITE=/dev/null ./configure --silent])
+AT_CHECK([echo Hello | CONFIG_SITE=/dev/null ./configure $configure_options --silent])
 
 AT_CLEANUP
 
index 668b67663222ed9e50edd308883d9898f871f677..8235be2cb4dd9ab01620b8297b1dbb72d6125429 100644 (file)
@@ -315,7 +315,7 @@ class foo foobar;
 
 AT_CHECK([autoconf])
 AT_CHECK([autoheader])
-AT_CHECK([./configure], [], [ignore], [ignore])
+AT_CHECK([./configure $configure_options], [], [ignore], [ignore])
 AT_CHECK([${MAKE-make} cpp-works || exit 77], [], [ignore], [ignore])
 AT_CHECK([${MAKE-make}], [], [ignore], [ignore])
 
index acc4669298ec1481468eb61259102a86f27e3762..dc9e0efaf27e73bce365e388eb40ba8d561720f3 100644 (file)
@@ -229,7 +229,7 @@ m4_define([AT_CHECK_AUTOHEADER],
 # Using --srcdir is more expensive.
 m4_define([AT_CHECK_CONFIGURE],
 [AT_CAPTURE_FILE([config.log])[]dnl
- AT_CHECK([./configure $1],
+ AT_CHECK([./configure $configure_options $1],
          [$2],
          m4_default([$3], [ignore]), [$4])])
 
index fe4c131fc1cd09c8fcbbc40d4ffc9701ed2154c9..b2fc7c3d0fd23073dff3a16f358cdaef87c4ef3e 100644 (file)
@@ -426,7 +426,7 @@ AT_CHECK_CONFIGURE([one=one --enable-two=two --with-three=three |
 AT_CHECK([./config.status --recheck | sed -n 's/^result=//p'], 0,
         [onetwothree
 ])
-AT_CHECK([args=`./config.status --config` && eval ./configure "$args" |
+AT_CHECK([args=`./config.status --config` && eval ./configure \$configure_options "$args" |
            sed -n -e 's/^result=//p'], 0,
         [m4_do([onetwothree
 ],             [onetwothree
@@ -441,7 +441,7 @@ AT_CHECK([./config.status --recheck | sed -n 's/^result=//p'], 0,
         ["'$ " '  $    "'$
 ])
 dnl restore font-lock: "
-AT_CHECK([args=`./config.status --config` && eval ./configure "$args" |
+AT_CHECK([args=`./config.status --config` && eval ./configure \$configure_options "$args" |
            sed -n -e 's/^result=//p'], 0,
         [m4_do(["'$ " '  $     "'$
 ],             ["'$ " '  $     "'$
@@ -1094,14 +1094,14 @@ rm -f -r foo at-dir/bar
 AT_CHECK_AUTOCONF
 
 # In place.
-AT_CHECK([./configure], [], [ignore])
+AT_CHECK([./configure $configure_options], [], [ignore])
 
 # Relative name.
-AT_CHECK([cd at-dir && ../configure], [], [ignore])
+AT_CHECK([cd at-dir && ../configure $configure_options], [], [ignore])
 
 # Absolute name.
 at_here=`pwd`
-AT_CHECK([cd at-dir && "$at_here/configure"], [], [ignore])
+AT_CHECK([cd at-dir && "$at_here/configure" $configure_options], [], [ignore])
 
 AT_CLEANUP
 
@@ -1141,17 +1141,20 @@ echo file1 > src/s
 echo file2 > src/t
 AT_CHECK_AUTOCONF
 cd build
-AT_CHECK([../configure && ../configure], 0, [ignore])
+AT_CHECK([../configure $configure_options && ../configure $configure_options],
+        0, [ignore])
 AT_CHECK([cat src/s src/t], 0, [file1
 file2
 ])
 cd ..
-AT_CHECK([./configure && ./configure], 0, [ignore], [stderr])
+AT_CHECK([./configure $configure_options && ./configure $configure_options],
+        0, [ignore], [stderr])
 AT_CHECK([grep src/t stderr], 1)
 AT_CHECK([cat src/s src/t], 0, [file1
 file2
 ])
-AT_CHECK(["`pwd`"/configure && "`pwd`"/configure], 0, [ignore], [ignore])
+AT_CHECK(["`pwd`"/configure $configure_options && "`pwd`"/configure $configure_options],
+        0, [ignore], [ignore])
 AT_CHECK([cat src/s src/t], 0, [file1
 file2
 ])
@@ -1243,7 +1246,7 @@ AT_CHECK([test -f inner/configure])
 # Running the outer configure recursively should provide the innermost
 # help strings.
 chmod a-w inner/innermost inner .
-AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep INNER], 0,
+AT_CHECK([{ ./configure $configure_options --help=recursive; chmod u+w .; } | grep INNER], 0,
         [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod u+w . inner inner/innermost
@@ -1259,7 +1262,7 @@ prefix=/usr/local
 
 # The same, but from a builddir.
 AS_MKDIR_P([builddir])
-AT_CHECK([cd builddir && ../configure], 0, [ignore])
+AT_CHECK([cd builddir && ../configure $configure_options], 0, [ignore])
 AT_CHECK([cat builddir/inner/innermost/config], 0,
 [INNER=inner
 srcdir=../../../inner/innermost
@@ -1269,7 +1272,8 @@ prefix=/usr/local
 
 # Make sure precious variables and command line options are properly
 # passed, even when there are duplicates.
-AT_CHECK([cd builddir && ../configure --prefix /bad --prefix /good INNER=bad INNER=good], 0, [ignore])
+AT_CHECK([cd builddir && ../configure $configure_options --prefix /bad --prefix /good INNER=bad INNER=good],
+        0, [ignore])
 AT_CHECK([cat builddir/inner/innermost/config], 0,
 [INNER=good
 srcdir=../../../inner/innermost
@@ -1287,7 +1291,7 @@ prefix=/a  b c$ 'd
 ])
 
 # Make sure --silent is properly passed...
-AT_CHECK([cd builddir && ../configure --silent], 0, [])
+AT_CHECK([cd builddir && ../configure $configure_options --silent], 0, [])
 # ...but not stored in config.status.
 AT_CHECK([cd builddir && ./config.status --recheck], 0, [stdout])
 AT_CHECK([grep 'creating \./config.status' stdout], 0, [ignore])
@@ -1360,27 +1364,27 @@ AT_CHECK([test -f inner2/configure])
 # Running the outer configure recursively should provide the innermost
 # help strings.
 chmod a-w inner/innermost inner
-AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep " INNER "],
+AT_CHECK([{ ./configure $configure_options --help=recursive; chmod u+w .; } | grep " INNER "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w .
-AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep " INNER2 "],
+AT_CHECK([{ ./configure $configure_options --help=recursive; chmod u+w .; } | grep " INNER2 "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w .
-AT_CHECK([{ ./configure --help=recursive; chmod u+w .; } | grep " INNERMOST "],
+AT_CHECK([{ ./configure $configure_options --help=recursive; chmod u+w .; } | grep " INNERMOST "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w .
-AT_CHECK([{ /bin/sh ./configure --help=recursive; chmod u+w .; } | grep " INNERMOST "],
+AT_CHECK([{ /bin/sh ./configure $configure_options --help=recursive; chmod u+w .; } | grep " INNERMOST "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w .
-AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; { /bin/sh configure --help=recursive; chmod +w .; } | grep " INNERMOST "],
+AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; { /bin/sh configure $configure_options --help=recursive; chmod +w .; } | grep " INNERMOST "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w .
-AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; { configure --help=recursive; chmod u+w .; } | grep " INNERMOST "],
+AT_CHECK([PATH=.$PATH_SEPARATOR$PATH; export PATH; { configure $configure_options --help=recursive; chmod u+w .; } | grep " INNERMOST "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod u+w inner inner/innermost
@@ -1402,31 +1406,31 @@ cd ..
 # The same, but from a builddir.
 AS_MKDIR_P([builddir])
 chmod a-w builddir inner/innermost inner
-AT_CHECK([cd builddir && { ../configure --help=recursive; chmod u+w .; } | grep " INNER "],
+AT_CHECK([cd builddir && { ../configure $configure_options --help=recursive; chmod u+w .; } | grep " INNER "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w builddir
-AT_CHECK([cd builddir && { ../configure --help=recursive; chmod u+w .; } | grep " INNER2 "],
+AT_CHECK([cd builddir && { ../configure $configure_options --help=recursive; chmod u+w .; } | grep " INNER2 "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w builddir
-AT_CHECK([cd builddir && { ../configure --help=recursive; chmod u+w .; } | grep " INNERMOST "],
+AT_CHECK([cd builddir && { ../configure $configure_options --help=recursive; chmod u+w .; } | grep " INNERMOST "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w builddir
-AT_CHECK([cd builddir && { /bin/sh ../configure --help=recursive; chmod u+w .; } | grep " INNERMOST "],
+AT_CHECK([cd builddir && { /bin/sh ../configure $configure_options --help=recursive; chmod u+w .; } | grep " INNERMOST "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod a-w builddir
 # Not all shells search $PATH for scripts.
-if (cd builddir && PATH=`pwd`/..$PATH_SEPARATOR$PATH /bin/sh configure --help) >/dev/null 2>&1; then
-  AT_CHECK([cd builddir && PATH=`pwd`/..$PATH_SEPARATOR$PATH /bin/sh configure --help=recursive | grep " INNERMOST "], 0, [ignore])
+if (cd builddir && PATH=`pwd`/..$PATH_SEPARATOR$PATH /bin/sh configure $configure_options --help) >/dev/null 2>&1; then
+  AT_CHECK([cd builddir && PATH=`pwd`/..$PATH_SEPARATOR$PATH /bin/sh configure $configure_options --help=recursive | grep " INNERMOST "], 0, [ignore])
 fi
-AT_CHECK([PATH=`pwd`$PATH_SEPARATOR$PATH; export PATH; cd builddir && { configure --help=recursive; chmod u+w .; } | grep " INNERMOST "],
+AT_CHECK([PATH=`pwd`$PATH_SEPARATOR$PATH; export PATH; cd builddir && { configure $configure_options --help=recursive; chmod u+w .; } | grep " INNERMOST "],
         0, [ignore], [stderr],
         [AT_CHECK([grep 'rerun with a POSIX shell' stderr], [], [ignore])])
 chmod u+w builddir inner inner/innermost
-AT_CHECK([cd builddir && ../configure INNERMOST=build/tsomrenni], 0, [ignore])
+AT_CHECK([cd builddir && ../configure $configure_options INNERMOST=build/tsomrenni], 0, [ignore])
 AT_CHECK([grep INNERMOST builddir/inner/innermost/config.h], 0,
 [[#define INNERMOST build/tsomrenni
 ]])
@@ -1468,10 +1472,10 @@ AT_CHECK([autoreconf -Wall -v], 0, [ignore], [ignore])
 
 # Running the outer configure recursively should provide the innermost
 # help strings.
-AT_CHECK([./configure --help=recursive | grep "folks"], 0, [ignore])
+AT_CHECK([./configure $configure_options --help=recursive | grep "folks"], 0, [ignore])
 
 # Running the outer configure should trigger the inner.
-AT_CHECK([./configure], 0, [ignore])
+AT_CHECK([./configure $configure_options], 0, [ignore])
 AT_CHECK([test -f inner/myfile], 0)
 
 AT_CLEANUP