[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 9/10] Do not pass top_srcdir to configure scripts in testsuite.
From: |
Ralf Wildenhues |
Subject: |
[PATCH 9/10] Do not pass top_srcdir to configure scripts in testsuite. |
Date: |
Tue, 4 Dec 2007 22:49:36 +0100 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
* tests/autotest.at (srcdir propagation): Copy install-sh to
source tree.
(my only test): Drop setting of `top_srcdir'.
* tests/base.at (Input/Output): Likewise.
* tests/local.at (AT_CONFIGURE_AC): Copy install-sh,
config.guess, and config.sub to test source tree.
Drop AC_CONFIG_AUX_DIR setting.
(AT_CHECK_CONFIGURE): Drop setting of `top_srcdir'.
* tests/torture.at (Substitute a 2000-byte string): Drop
AC_CONFIG_AUX_DIR setting, copy install-sh to test source tree.
(Substitute a newline, datarootdir workaround): Likewise.
(Define a newline): Adjust for linenumber changes in configure.ac.
* tests/foreign.at (Libtool): Adjust comment to reflect changes.
---
This change will make the testsuite a bit slower. However, it will
also make the tests more similar to actual usage (users have to copy
those files as well if they don't use Automake).
Cheers,
Ralf
tests/autotest.at | 11 ++++++-----
tests/base.at | 4 ++--
tests/foreign.at | 9 ++++-----
tests/local.at | 6 ++++--
tests/torture.at | 21 ++++++++++++---------
5 files changed, 28 insertions(+), 23 deletions(-)
diff --git a/tests/autotest.at b/tests/autotest.at
index 0f3fdf0..e043d7a 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -559,10 +559,11 @@ AT_DATA([pkg/a])
AT_DATA([pkg/t/b])
AT_DATA([pkg/configure.ac], [[AC_INIT
-AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
AC_CONFIG_TESTDIR([t])
AC_OUTPUT
]])
+cp "$abs_top_srcdir/build-aux/install-sh" pkg
+
cd pkg
AT_CHECK_AUTOCONF
cd ..
@@ -584,7 +585,7 @@ cd ../..
# Build directory totally outside source directory.
cd vpath-outside
-AT_CHECK([top_srcdir=$abs_top_srcdir ../pkg/configure], [0], [ignore])
+AT_CHECK([../pkg/configure], [0], [ignore])
cd t
AT_CHECK([../../pkg/t/suite], [0], [ignore])
cd ../..
@@ -592,20 +593,20 @@ cd ../..
# Build directory totally outside source directory (absolute).
my_srcdir=`pwd`/pkg
cd vpath-abs
-AT_CHECK([top_srcdir=$abs_top_srcdir "$my_srcdir"/configure], [0], [ignore])
+AT_CHECK(["$my_srcdir"/configure], [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([top_srcdir=$abs_top_srcdir ../configure], [0], [ignore])
+AT_CHECK([../configure], [0], [ignore])
cd t
AT_CHECK([../../t/suite], [0], [ignore])
cd ../../..
# Build directory as parent of source directory.
-AT_CHECK([top_srcdir=$abs_top_srcdir pkg/configure], [0], [ignore])
+AT_CHECK([pkg/configure], [0], [ignore])
cd t
AT_CHECK([../pkg/t/suite], [0], [ignore])
cd ..
diff --git a/tests/base.at b/tests/base.at
index f1f1a9d..f86c6b7 100644
--- a/tests/base.at
+++ b/tests/base.at
@@ -298,9 +298,9 @@ AT_DATA([configure.ac],
cat <&AS_ORIGINAL_STDIN_FD >&AS_MESSAGE_FD
]])
AT_CHECK_AUTOCONF
-AT_CHECK([echo Hello | top_srcdir=$abs_top_srcdir ./configure | grep -v
'configure: loading site script '],, [Hello
+AT_CHECK([echo Hello | ./configure | grep -v 'configure: loading site script
'],, [Hello
])
-AT_CHECK([echo Hello | top_srcdir=$abs_top_srcdir ./configure --silent])
+AT_CHECK([echo Hello | ./configure --silent])
AT_CLEANUP
diff --git a/tests/foreign.at b/tests/foreign.at
index 269e5d7..6348a58 100644
--- a/tests/foreign.at
+++ b/tests/foreign.at
@@ -2,8 +2,8 @@
AT_BANNER([Compatibility with other tools.])
-# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free
+# Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -45,9 +45,8 @@ esac]],
# Using a configure.in, have libtoolize confess where libtool.m4 is.
AT_DATA([configure.in],
[[AC_INIT
-# The other tests are relying on Autoconf's own copy of install-sh
-# etc. via AC_CONFIG_AUX_DIR(..). Don't do that here, since we don't
-# want libtoolize to pollute Autoconf's srcdir.
+# State that we explicitly want auxiliary files here, so libtoolize
+# won't pollute files outside the test directory.
AC_CONFIG_AUX_DIR(.)
AC_PROG_LIBTOOL
]])
diff --git a/tests/local.at b/tests/local.at
index 75823e2..855ebd3 100644
--- a/tests/local.at
+++ b/tests/local.at
@@ -203,13 +203,15 @@ ls -1 | sed '/^at-/d;/^state-/d;/^config\./d' | sort
>state-ls.$][1
AT_DATA([configure.ac],
[[AC_INIT
-AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
AC_CONFIG_HEADER(config.h:config.hin)
AC_STATE_SAVE(before)]
$1
[AC_OUTPUT
AC_STATE_SAVE(after)
]])
+cp "$abs_top_srcdir/build-aux/install-sh" \
+ "$abs_top_srcdir/build-aux/config.guess" \
+ "$abs_top_srcdir/build-aux/config.sub" .
])# AT_CONFIGURE_AC
@@ -240,7 +242,7 @@ m4_define([AT_CHECK_AUTOHEADER],
# Using --srcdir is more expensive.
m4_define([AT_CHECK_CONFIGURE],
[AT_CAPTURE_FILE([config.log])[]dnl
- AT_CHECK([top_srcdir=$abs_top_srcdir ./configure $1],
+ AT_CHECK([./configure $1],
[$2],
m4_default([$3], [ignore]), [$4])])
diff --git a/tests/torture.at b/tests/torture.at
index 8371d1a..11c619d 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -660,7 +660,6 @@ AT_DATA([Baz.in], address@hidden@
AT_DATA([configure.ac],
[[AC_INIT
-AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
AC_SUBST([foo], ]m4_for([n], 1, 100,, ....................)[)
AC_SUBST([bar], "]m4_for([n], 1, 100,, @ @ @ @ @ @ @ @ @ @@)[")
baz="]m4_for([m], 1, 100,, ... ... ... ... ....)[
@@ -672,6 +671,8 @@ AC_CONFIG_FILES([Foo Bar Baz])
AC_OUTPUT
]])
+cp "$abs_top_srcdir/build-aux/install-sh" .
+
AT_CHECK_AUTOCONF
# Check both awk and the result of AC_PROG_AWK
for awk_arg in Foo= AWK=awk; do
@@ -803,7 +804,6 @@ AT_DATA([Foo.in],
AT_DATA([configure.ac],
[[AC_INIT
-AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
foo='one
two'
bar='%!_!# ''
@@ -815,6 +815,8 @@ AC_PROG_AWK
AC_OUTPUT
]])
+cp "$abs_top_srcdir/build-aux/install-sh" .
+
echo 'one
two
%!_!# ''
@@ -838,14 +840,14 @@ AT_CONFIGURE_AC([[AC_DEFINE([foo], [one
two], [This spans two lines.])
]])
AT_CHECK_AUTOCONF([], [], [], [stderr])
-dnl Older versions of m4 report error at line 6 (end of macro);
-dnl newer versions report it at line 5 (start of macro).
-AT_CHECK([[sed 's/^configure.ac:[56]: //' stderr]], [],
+dnl Older versions of m4 report error at line 5 (end of macro);
+dnl newer versions report it at line 4 (start of macro).
+AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [],
[[warning: AC_DEFINE: `one
two' is not a valid preprocessor define value
]])
AT_CHECK_AUTOHEADER([], [], [], [stderr])
-AT_CHECK([[sed 's/^configure.ac:[56]: //' stderr]], [],
+AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [],
[[warning: AC_DEFINE: `one
two' is not a valid preprocessor define value
]])
@@ -857,12 +859,12 @@ AT_CONFIGURE_AC([[AC_DEFINE_UNQUOTED([foo], [one
two], [This spans two lines.])
]])
AT_CHECK_AUTOCONF([], [], [], [stderr])
-AT_CHECK([[sed 's/^configure.ac:[56]: //' stderr]], [],
+AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [],
[[warning: AC_DEFINE_UNQUOTED: `one
two' is not a valid preprocessor define value
]])
AT_CHECK_AUTOHEADER([], [], [], [stderr])
-AT_CHECK([[sed 's/^configure.ac:[56]: //' stderr]], [],
+AT_CHECK([[sed 's/^configure.ac:[45]: //' stderr]], [],
[[warning: AC_DEFINE_UNQUOTED: `one
two' is not a valid preprocessor define value
]])
@@ -925,7 +927,6 @@ AT_DATA([configure.ac],
[[AC_INIT
d@&address@hidden The following line silences the warnings, if uncommented:
d@&address@hidden AC_DEFUN([AC_DATAROOTDIR_CHECKED])
-AC_CONFIG_AUX_DIR($top_srcdir/build-aux)
# This substitution is wrong and bogus! Don't use it in your own code!
# Read `info Autoconf "Defining Directories"'!
@@ -935,6 +936,8 @@ AC_CONFIG_FILES([Foo Bar])
AC_OUTPUT
]])
+cp "$abs_top_srcdir/build-aux/install-sh" .
+
AT_CHECK_AUTOCONF
AT_CHECK_CONFIGURE([], [], [],
[config.status: WARNING: 'Foo.in' seems to ignore the --datarootdir setting
--
1.5.3.6.950.g92b7b
- Re: [PATCH 1/10] Proper file name escaping in Autoconf programs and Perl modules., (continued)
- [PATCH 2/10] * lib/autom4te.in: Quote @address@hidden, Ralf Wildenhues, 2007/12/04
- [PATCH 3/10] Fix Autotest for whitespace in `pwd`., Ralf Wildenhues, 2007/12/04
- [PATCH 4/10] Proper config.status --file/--header and $srcdir escaping., Ralf Wildenhues, 2007/12/04
- [PATCH 5/10] Fix testsuite program wrapper for whitespace in `pwd`., Ralf Wildenhues, 2007/12/04
- [PATCH 6/10] * tests/m4sh.at (LINENO): Quote $0., Ralf Wildenhues, 2007/12/04
- [PATCH 7/10] Quote $abs_top_srcdir in tests., Ralf Wildenhues, 2007/12/04
- [PATCH 8/10] * tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): Skip test if `pwd` contains whitespace., Ralf Wildenhues, 2007/12/04
- [PATCH 9/10] Do not pass top_srcdir to configure scripts in testsuite.,
Ralf Wildenhues <=
- [PATCH 10/10] * tests/torture.at (srcdir): Fix quoting., Ralf Wildenhues, 2007/12/04
- Re: [PATCH 0/10] Whitespace robustness patch series, Paul Eggert, 2007/12/04
- Re: [PATCH 0/10] Whitespace robustness patch series, Jim Meyering, 2007/12/07
- Re: [PATCH 0/10] Whitespace robustness patch series, Benoit Sigoure, 2007/12/16