mirror of
git://git.sv.gnu.org/autoconf
synced 2024-11-21 01:01:48 +08:00
* lib/autotest/general.m4 (AT_INIT): Compute top_builddir,
top_srcdir and srcdir from at_topbuild_2_topsrc and at_testdir. Load atlocal late enough to dump it in the log. * m4/atconfig.m4 (AT_CONFIG): Pass them to atconfig.
This commit is contained in:
parent
e2002fb052
commit
e901ead496
@ -1,3 +1,10 @@
|
||||
2001-08-20 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* lib/autotest/general.m4 (AT_INIT): Compute top_builddir,
|
||||
top_srcdir and srcdir from at_topbuild_2_topsrc and at_testdir.
|
||||
Load atlocal late enough to dump it in the log.
|
||||
* m4/atconfig.m4 (AT_CONFIG): Pass them to atconfig.
|
||||
|
||||
2001-08-20 Akim Demaille <akim@epita.fr>
|
||||
|
||||
* tests/torture.at (Configuring subdirectories): New test.
|
||||
|
@ -26,7 +26,7 @@ AC_CONFIG_AUX_DIR(config)
|
||||
AM_INIT_AUTOMAKE(autoconf, 2.52c)
|
||||
|
||||
# Initialize the test suite.
|
||||
AT_CONFIG(tests, ../bin)
|
||||
AT_CONFIG(tests, bin)
|
||||
AC_PATH_PROG(EXPR, expr)
|
||||
|
||||
# We use a path for GNU m4 so even if users have another m4 first in
|
||||
|
@ -94,6 +94,15 @@ AS_SHELL_SANITIZE
|
||||
SHELL=${CONFIG_SHELL-/bin/sh}
|
||||
|
||||
. ./atconfig
|
||||
|
||||
# Path to the top builddir: reverse at_testdir
|
||||
top_builddir=`echo '$at_testdir' |
|
||||
sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,/$,,'`
|
||||
# Path to the top srcdir: to go to top build, then to top src
|
||||
top_srcdir=$top_builddir/$at_topbuild_2_topsrc
|
||||
# Path to srcdir: from top srcdir to this dir.
|
||||
srcdir=$top_srcdir/$at_testdir
|
||||
|
||||
# Use absolute file notations, as the test might change directories.
|
||||
at_srcdir=`cd "$srcdir" && pwd`
|
||||
at_top_srcdir=`cd "$top_srcdir" && pwd`
|
||||
@ -112,8 +121,6 @@ IFS=$at_IFS_save
|
||||
PATH=$at_path
|
||||
export PATH
|
||||
|
||||
test -f atlocal && . ./atlocal
|
||||
|
||||
# -e sets to true
|
||||
at_stop_on_error=false
|
||||
# Shall we be verbose?
|
||||
@ -197,14 +204,6 @@ else
|
||||
at_diff=diff
|
||||
fi
|
||||
|
||||
# Tester and tested.
|
||||
if $1 --version | grep "$at_package.*$at_version" >/dev/null; then
|
||||
AS_BOX([Test suite for $at_package $at_version])
|
||||
else
|
||||
AS_BOX([ERROR: Not using the proper version, no tests performed])
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Setting up the FDs.
|
||||
# 5 is stdout conditioned by verbosity.
|
||||
if test $at_verbose = echo; then
|
||||
@ -218,6 +217,14 @@ if $at_debug; then
|
||||
exec 6>/dev/null
|
||||
else
|
||||
exec 6>$as_me.log
|
||||
fi
|
||||
|
||||
# Load the user config file before checking the PATH.
|
||||
test -r ./atlocal && . ./atlocal
|
||||
|
||||
# Tester and tested.
|
||||
if $1 --version | grep "$at_package.*$at_version" >/dev/null; then
|
||||
AS_BOX([Test suite for $at_package $at_version])
|
||||
{
|
||||
AS_BOX([Test suite log for $at_package $at_version])
|
||||
echo
|
||||
@ -234,8 +241,19 @@ else
|
||||
AS_UNAME
|
||||
echo
|
||||
|
||||
# Inform about the contents of the config files.
|
||||
echo "$as_me: atconfig:" >&6
|
||||
sed 's/^/| /' atconfig >&6
|
||||
if test -r ./atlocal; then
|
||||
echo "$as_me: atlocal:" >&6
|
||||
sed 's/^/| /' atlocal >&6
|
||||
fi
|
||||
|
||||
AS_BOX([Running silently the tests])
|
||||
} >&6
|
||||
else
|
||||
AS_BOX([ERROR: Not using the proper version, no tests performed])
|
||||
exit 1
|
||||
fi
|
||||
|
||||
at_start_date=`date`
|
||||
|
@ -2,7 +2,7 @@
|
||||
## Prepare for testing. ##
|
||||
## ----------------------##
|
||||
|
||||
#serial 5
|
||||
#serial 6
|
||||
|
||||
# Copyright 2000, 2001 Free Software Foundation, Inc.
|
||||
#
|
||||
@ -21,14 +21,15 @@
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
# 02111-1307, USA.
|
||||
|
||||
|
||||
# AT_CONFIG(TEST-DIRECTORY, [AUTOTEST-PATH = .])
|
||||
# ----------------------------------------------
|
||||
# Configure the test suite.
|
||||
#
|
||||
# AUTOTEST-PATH must help the test suite to find the executables, i.e.,
|
||||
# if the test suite is in `tests/' and the executables are in `src/',
|
||||
# pass `../src'. If there are also executables in the source tree, use
|
||||
# `../src:$top_srcdir/src'.
|
||||
# AUTOTEST-PATH must help the test suite to find the executables,
|
||||
# i.e., if the executables are in `src/', pass `src'. If there are
|
||||
# also executables in the source tree, use `src:$top_srcdir/src'.
|
||||
|
||||
AC_DEFUN([AT_CONFIG],
|
||||
[AC_CONFIG_COMMANDS([$1/atconfig],
|
||||
[cat >$1/atconfig <<EOF
|
||||
@ -43,8 +44,9 @@ at_bugreport='$at_bugreport'
|
||||
at_n='$at_n'
|
||||
at_c='$at_c'
|
||||
|
||||
srcdir='$srcdir'
|
||||
top_srcdir='$top_srcdir'
|
||||
at_testdir='$1'
|
||||
at_topbuild_2_topsrc='$at_topbuild_2_topsrc'
|
||||
|
||||
AUTOTEST_PATH='m4_default([$2], [.])'
|
||||
|
||||
SHELL=\${CONFIG_SHELL-'$at_shell'}
|
||||
@ -59,8 +61,8 @@ at_bugreport='$PACKAGE_BUGREPORT'
|
||||
at_n='$ECHO_N'
|
||||
at_c='$ECHO_C'
|
||||
|
||||
srcdir='$srcdir'
|
||||
top_srcdir=`echo '$1/' | sed 's,^\./,,;s,[[^/]]$,&/,;s,[[^/]]*/,../,g;s,/$,,'`
|
||||
# Path from top_build to top_src
|
||||
at_topbuild_2_topsrc=$srcdir
|
||||
|
||||
at_shell='$SHELL'
|
||||
at_path_separator='$PATH_SEPARATOR'
|
||||
|
Loading…
Reference in New Issue
Block a user