[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
98-improve-testsuite-log.patch
From: |
Akim Demaille |
Subject: |
98-improve-testsuite-log.patch |
Date: |
15 Jan 2001 08:36:43 +0100 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake) |
Index: ChangeLog
from Akim Demaille <address@hidden>
* Makefile.am (editpl, editsh): Merge into...
(edit).
* m4sh.m4 (AS_UNAME): Eved out from...
* acgeneral.m4 (_AC_INIT_DEFAULTS): here.
(_AC_INIT_PACKAGE): Define AC_PACKAGE_NAME.
(_AC_INIT_PARSE_ARGS): AC_SUBST the PACKAGE_ variables.
Propagate their use in the executables and the test suite.
* tests/atgeneral.m4 (PATH): Include only absolute paths.
(AT_INIT): Use AS_UNAME.
Index: Makefile.am
--- Makefile.am Fri, 12 Jan 2001 00:29:35 +0100 akim (ace/45_Makefile.a 1.42
644)
+++ Makefile.am Sat, 13 Jan 2001 10:39:13 +0100 akim (ace/45_Makefile.a 1.42
644)
@@ -30,6 +30,10 @@
bin_SCRIPTS = autoconf autoheader autoreconf autoupdate ifnames @PERLSCRIPTS@
EXTRA_SCRIPTS = autoscan
+# FIXME: Current Automakes are blind and cannot see inner AC_SUBST,
+# so help it.
+PACKAGE_NAME = @PACKAGE_NAME@
+
# FIXME:
# s/distpackageDATA/dist_pkgdata_DATA/
# s/nodistpackageDATA/nodist_pkgdata_DATA/
@@ -112,22 +116,17 @@
## The scripts. ##
## ------------- ##
-editsh = sed \
- -e 's,@datadir\@,$(pkgdatadir),g' \
- -e 's,@M4\@,$(M4),g' \
- -e 's,@AWK\@,$(AWK),g' \
+edit = sed \
-e 's,@SHELL\@,$(SHELL),g' \
- -e 's,@VERSION\@,$(VERSION),g' \
- -e 's,@PACKAGE\@,$(PACKAGE),g' \
+ -e 's,@PERL\@,$(PERL),g' \
+ -e 's,@datadir\@,$(pkgdatadir),g' \
-e 's,@bindir\@,$(bindir),g' \
-e 's,@autoconf-name\@,'`echo autoconf | sed '$(transform)'`',g' \
- -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g'
-
-editpl = sed \
- -e 's,@datadir\@,$(pkgdatadir),g' \
- -e 's,@PERL\@,$(PERL),g' \
+ -e 's,@autoheader-name\@,'`echo autoheader | sed '$(transform)'`',g' \
+ -e 's,@M4\@,$(M4),g' \
+ -e 's,@AWK\@,$(AWK),g' \
-e 's,@VERSION\@,$(VERSION),g' \
- -e 's,@PACKAGE\@,$(PACKAGE),g'
+ -e 's,@PACKAGE_NAME\@,$(PACKAGE_NAME),g'
## All the scripts below depend on configure.in so that they are rebuilt
## when the Autoconf version changes. Unfortunately, suffix rules cannot
@@ -136,37 +135,37 @@
autoconf: $(srcdir)/autoconf.sh $(srcdir)/configure.in
rm -f autoconf autoconf.tmp
- $(editsh) $(srcdir)/autoconf.sh >autoconf.tmp
+ $(edit) $(srcdir)/autoconf.sh >autoconf.tmp
chmod +x autoconf.tmp
mv autoconf.tmp autoconf
autoheader: $(srcdir)/autoheader.sh $(srcdir)/configure.in
rm -f autoheader autoheader.tmp
- $(editsh) $(srcdir)/autoheader.sh >autoheader.tmp
+ $(edit) $(srcdir)/autoheader.sh >autoheader.tmp
chmod +x autoheader.tmp
mv autoheader.tmp autoheader
autoreconf: $(srcdir)/autoreconf.sh $(srcdir)/configure.in
rm -f autoreconf autoreconf.tmp
- $(editsh) $(srcdir)/autoreconf.sh >autoreconf.tmp
+ $(edit) $(srcdir)/autoreconf.sh >autoreconf.tmp
chmod +x autoreconf.tmp
mv autoreconf.tmp autoreconf
autoupdate: $(srcdir)/autoupdate.sh $(srcdir)/configure.in
rm -f autoupdate autoupdate.tmp
- $(editsh) $(srcdir)/autoupdate.sh >autoupdate.tmp
+ $(edit) $(srcdir)/autoupdate.sh >autoupdate.tmp
chmod +x autoupdate.tmp
mv autoupdate.tmp autoupdate
ifnames: $(srcdir)/ifnames.sh $(srcdir)/configure.in
rm -f ifnames ifnames.tmp
- $(editsh) $(srcdir)/ifnames.sh >ifnames.tmp
+ $(edit) $(srcdir)/ifnames.sh >ifnames.tmp
chmod +x ifnames.tmp
mv ifnames.tmp ifnames
autoscan: $(srcdir)/autoscan.pl $(srcdir)/configure.in
rm -f autoscan autoscan.tmp
- $(editpl) $(srcdir)/autoscan.pl >autoscan.tmp
+ $(edit) $(srcdir)/autoscan.pl >autoscan.tmp
chmod +x autoscan.tmp
mv autoscan.tmp autoscan
Index: acgeneral.m4
--- acgeneral.m4 Fri, 12 Jan 2001 22:48:19 +0100 akim (ace/27_acgeneral.
1.169.8.109 644)
+++ acgeneral.m4 Sat, 13 Jan 2001 11:00:33 +0100 akim (ace/27_acgeneral.
1.169.8.109 644)
@@ -582,10 +582,14 @@ m4_define([AC_HELP_STRING],
-# _AC_INIT_PACKAGE(PACKAGE, VERSION, [BUG-REPORT])
-# ------------------------------------------------
+# _AC_INIT_PACKAGE(PACKAGE-NAME, VERSION,
+# [BUG-REPORT],
+# [TAR-NAME = unGNU'd lower case PACKAGE-NAME])
+# --------------------------------------------------------------
m4_define([_AC_INIT_PACKAGE],
[m4_define([AC_PACKAGE_NAME], [$1])
+m4_define([AC_PACKAGE_TARNAME],
+ m4_tolower(m4_patsubst([[[$1]]], [GNU ])))
m4_define([AC_PACKAGE_VERSION], [$2])
m4_define([AC_PACKAGE_STRING], [$1 $2])
m4_define([AC_PACKAGE_BUGREPORT], [$3])
@@ -739,7 +743,7 @@ m4_define([_AC_INIT_DEFAULTS],
# Name of the executable.
as_me=`echo "$[0]" | sed 's,.*/,,'`
-cat >config.log << EOF
+cat >config.log <<EOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
@@ -747,30 +751,10 @@ m4_define([_AC_INIT_DEFAULTS],
[(AC_PACKAGE_STRING) ])AC_ACVERSION, executed with
> $[0] address@hidden
+EOF
+AS_UNAME >>config.log
-## ---------- ##
-## Platform. ##
-## ---------- ##
-
-hostname = $ac_hostname
-uname -m = `(uname -m) 2>/dev/null || echo unknown`
-uname -r = `(uname -r) 2>/dev/null || echo unknown`
-uname -s = `(uname -s) 2>/dev/null || echo unknown`
-uname -v = `(uname -v) 2>/dev/null || echo unknown`
-
-/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
-/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
-
-/bin/arch = `(/bin/arch) 2>/dev/null`
-/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
-/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
-hostinfo = `(hostinfo) 2>/dev/null`
-/bin/machine = `(/bin/machine) 2>/dev/null`
-/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
-/bin/universe = `(/bin/universe) 2>/dev/null`
-
-PATH = $PATH
-
+cat >>config.log <<EOF
## ------------ ##
## Core tests. ##
## ------------ ##
@@ -915,23 +899,36 @@ m4_define([_AC_INIT_PARSE_ARGS],
verbose=
x_includes=NONE
x_libraries=NONE
-dnl Installation directory options.
-dnl These are left unexpanded so users can "make install exec_prefix=/foo"
-dnl and all the variables that are supposed to be based on exec_prefix
-dnl by default will actually change.
-dnl Use braces instead of parens because sh, perl, etc. also accept them.
-AC_SUBST(bindir, '${exec_prefix}/bin')dnl
-AC_SUBST(sbindir, '${exec_prefix}/sbin')dnl
-AC_SUBST(libexecdir, '${exec_prefix}/libexec')dnl
-AC_SUBST(datadir, '${prefix}/share')dnl
-AC_SUBST(sysconfdir, '${prefix}/etc')dnl
-AC_SUBST(sharedstatedir, '${prefix}/com')dnl
-AC_SUBST(localstatedir, '${prefix}/var')dnl
-AC_SUBST(libdir, '${exec_prefix}/lib')dnl
-AC_SUBST(includedir, '${prefix}/include')dnl
-AC_SUBST(oldincludedir, '/usr/include')dnl
-AC_SUBST(infodir, '${prefix}/info')dnl
-AC_SUBST(mandir, '${prefix}/man')dnl
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+AC_SUBST([bindir], ['${exec_prefix}/bin'])dnl
+AC_SUBST([sbindir], ['${exec_prefix}/sbin'])dnl
+AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])dnl
+AC_SUBST([datadir], ['${prefix}/share'])dnl
+AC_SUBST([sysconfdir], ['${prefix}/etc'])dnl
+AC_SUBST([sharedstatedir], ['${prefix}/com'])dnl
+AC_SUBST([localstatedir], ['${prefix}/var'])dnl
+AC_SUBST([libdir], ['${exec_prefix}/lib'])dnl
+AC_SUBST([includedir], ['${prefix}/include'])dnl
+AC_SUBST([oldincludedir], ['/usr/include'])dnl
+AC_SUBST([infodir], ['${prefix}/info'])dnl
+AC_SUBST([mandir], ['${prefix}/man'])dnl
+
+# Identity of this package.
+AC_SUBST([PACKAGE_NAME],
+ [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])dnl
+AC_SUBST([PACKAGE_TARNAME],
+ [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])dnl
+AC_SUBST([PACKAGE_VERSION],
+ [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])dnl
+AC_SUBST([PACKAGE_STRING],
+ [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])dnl
+AC_SUBST([PACKAGE_BUGREPORT],
+ [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])dnl
ac_prev=
for ac_option
Index: autoconf.sh
--- autoconf.sh Fri, 12 Jan 2001 22:21:56 +0100 akim (ace/17_autoconf.s
1.31.8.39 644)
+++ autoconf.sh Sat, 13 Jan 2001 10:30:08 +0100 akim (ace/17_autoconf.s
1.31.8.39 644)
@@ -60,7 +60,7 @@
Report bugs to <address@hidden>."
version="\
-autoconf (GNU @PACKAGE@) @VERSION@
+autoconf (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie.
Copyright 1992, 1993, 1994, 1996, 1999, 2000
Index: autoheader.sh
--- autoheader.sh Sat, 23 Dec 2000 11:50:19 +0100 akim (ace/14_autoheader
1.27.8.24 644)
+++ autoheader.sh Sat, 13 Jan 2001 10:30:08 +0100 akim (ace/14_autoheader
1.27.8.24 644)
@@ -49,7 +49,7 @@
Report bugs to <address@hidden>."
version="\
-autoheader (GNU @PACKAGE@) @VERSION@
+autoheader (@PACKAGE_NAME@) @VERSION@
Written by Roland McGrath.
Copyright 1992, 1993, 1994, 1996, 1998, 1999, 2000
Index: autoreconf.sh
--- autoreconf.sh Fri, 12 Jan 2001 22:21:56 +0100 akim (ace/12_autoreconf 1.50
644)
+++ autoreconf.sh Sat, 13 Jan 2001 10:30:08 +0100 akim (ace/12_autoreconf 1.50
644)
@@ -63,7 +63,7 @@
Report bugs to <address@hidden>."
version="\
-autoreconf (GNU @PACKAGE@) @VERSION@
+autoreconf (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie.
Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
Index: autoscan.pl
--- autoscan.pl Sat, 23 Dec 2000 11:50:19 +0100 akim (ace/13_autoscan.p 1.19
644)
+++ autoscan.pl Sat, 13 Jan 2001 10:30:08 +0100 akim (ace/13_autoscan.p 1.19
644)
@@ -64,7 +64,7 @@
# Display version (--version).
sub print_version
{
- print "autoscan (GNU @PACKAGE@) @VERSION@
+ print "autoscan (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie.
Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
Index: autoupdate.sh
--- autoupdate.sh Fri, 12 Jan 2001 22:21:56 +0100 akim (ace/11_autoupdate 1.35
644)
+++ autoupdate.sh Sat, 13 Jan 2001 10:30:08 +0100 akim (ace/11_autoupdate 1.35
644)
@@ -46,7 +46,7 @@
Report bugs to <address@hidden>."
version="\
-autoupdate (GNU @PACKAGE@) @VERSION@
+autoupdate (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie.
Copyright 1994, 1999, 2000 Free Software Foundation, Inc.
Index: configure.in
--- configure.in Fri, 12 Jan 2001 00:29:35 +0100 akim (ace/7_configure. 1.28
644)
+++ configure.in Sat, 13 Jan 2001 10:31:47 +0100 akim (ace/7_configure. 1.28
644)
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.49c)
-AC_INIT(Autoconf, 2.49c, address@hidden)
+AC_INIT(GNU Autoconf, 2.49c, address@hidden)
AC_CONFIG_SRCDIR(acgeneral.m4)
AM_INIT_AUTOMAKE(autoconf, 2.49c)
Index: ifnames.sh
--- ifnames.sh Sat, 11 Nov 2000 16:02:51 +0100 akim (ace/10_ifnames.sh 1.10 644)
+++ ifnames.sh Sat, 13 Jan 2001 10:30:08 +0100 akim (ace/10_ifnames.sh 1.10 644)
@@ -40,7 +40,7 @@
Report bugs to <address@hidden>."
version="\
-ifnames (GNU @PACKAGE@) @VERSION@
+ifnames (@PACKAGE_NAME@) @VERSION@
Written by David J. MacKenzie and Paul Eggert.
Copyright 1994, 1995, 1999, 2000 Free Software Foundation, Inc.
Index: m4/atconfig.m4
--- m4/atconfig.m4 Fri, 03 Nov 2000 20:58:02 +0100 akim (ace/b/16_atconfig.m
1.6 644)
+++ m4/atconfig.m4 Sat, 13 Jan 2001 10:19:13 +0100 akim (ace/b/16_atconfig.m
1.6 644)
@@ -2,12 +2,15 @@
## Prepare for testing. ##
## ----------------------##
-#serial 2
-
-# Single argument says where are built sources to test, relative to the
-# built test directory. Maybe omitted if the same (flat distribution).
+#serial 3
+# AT_CONFIG([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'.
AC_DEFUN([AT_CONFIG],
-[AUTOTEST_PATH=ifelse([$1], [], [.], [$1])
-AC_SUBST(AUTOTEST_PATH)
-])
+[AC_SUBST([AUTOTEST_PATH], [m4_default([$1], [.])])])
Index: m4sh.m4
--- m4sh.m4 Fri, 12 Jan 2001 23:15:49 +0100 akim (ace/b/41_m4sh.m4 1.17 644)
+++ m4sh.m4 Sat, 13 Jan 2001 11:07:59 +0100 akim (ace/b/41_m4sh.m4 1.17 644)
@@ -381,3 +381,36 @@ m4_define([AS_TMPDIR],
AS_EXIT
}dnl
])# AS_TMPDIR
+
+
+# AS_UNAME
+# --------
+# Try to describe this machine. Meant for logs.
+m4_define([AS_UNAME],
+[{
+cat <<_ASUNAME
+## ---------- ##
+## Platform. ##
+## ---------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+PATH = $PATH
+
+_ASUNAME
+}])
Index: tests/atconfig.in
--- tests/atconfig.in Sun, 19 Nov 2000 15:53:46 +0100 akim (ace/b/18_atconfig.i
1.7 644)
+++ tests/atconfig.in Sat, 13 Jan 2001 11:03:55 +0100 akim (ace/b/18_atconfig.i
1.7 644)
@@ -48,14 +48,16 @@
# This debugging script has been automatically generated from `make check'.
# Call it with `--help' to get a quick usage summary.
address@hidden@
address@hidden@
address@hidden@
+at_package='@PACKAGE_NAME@'
+at_version='@PACKAGE_VERSION@'
+at_bugreport='@PACKAGE_BUGREPORT@'
+
+at_n='@ECHO_N@'
at_c='@ECHO_C@'
address@hidden@
address@hidden@
address@hidden@
+srcdir='@srcdir@'
+top_srcdir='@top_srcdir@'
+AUTOTEST_PATH='@AUTOTEST_PATH@'
# We need GNU m4.
address@hidden@
+M4='@M4@'
Index: tests/atgeneral.m4
--- tests/atgeneral.m4 Sat, 13 Jan 2001 00:12:54 +0100 akim
(ace/b/19_atgeneral. 1.50 644)
+++ tests/atgeneral.m4 Sat, 13 Jan 2001 11:01:07 +0100 akim
(ace/b/19_atgeneral. 1.50 644)
@@ -94,16 +94,24 @@ m4_define([AT_data_files], [stdout stder
AS_SHELL_SANITIZE
+# Name of the executable.
+as_me=`echo "$[0]" | sed 's,.*/,,'`
+
. ./atconfig
# Use absolute file notations, as the test might change directories.
at_srcdir=`cd "$srcdir" && pwd`
at_top_srcdir=`cd "$top_srcdir" && pwd`
-if test -n "$AUTOTEST_PATH"; then
- export PATH; PATH=`pwd`:`cd "$AUTOTEST_PATH" && pwd`:$PATH
-else
- export PATH; PATH=`pwd`:$PATH
-fi
+# Don't take risks: use absolute path names.
+at_path=`pwd`
+at_IFS_save=$IFS
+IFS=:
+for at_dir in $AUTOTEST_PATH:$PATH; do
+ at_path=$at_path:`cd "$at_dir" && pwd`
+done
+IFS=$at_IFS_save
+PATH=$at_path
+export PATH
test -f atlocal && . ./atlocal
@@ -193,7 +201,7 @@ m4_define([AT_data_files], [stdout stder
# over files, the full test suite cleans up both before and after test groups.
if $1 --version | grep "$at_package.*$at_version" >/dev/null; then
- AS_BOX([Testing suite for $at_package, version $at_version])
+ AS_BOX([Testing suite for $at_package $at_version])
else
AS_BOX([ERROR: Not using the proper version, no tests performed])
exit 1
@@ -278,11 +286,15 @@ m4_define([AT_data_files], [stdout stder
echo 'case the testsuite provide a good starting point.'
echo
echo 'Now, failed tests will be executed again, verbosely, and logged'
- echo 'in the file '$[0]'.log. When sending this file to the maintainers,'
- echo 'be careful to give at least all the information you have: version'
- echo 'numbers, decription of your environment etc.'
- ${CONFIG_SHELL-/bin/sh} $[0] -v -d $at_failed_list 2>&1 | tee $[0].log
+ echo 'in the file '$[0]'.log.'
+
+ AS_UNAME >$[0].log
+ ${CONFIG_SHELL-/bin/sh} $[0] -v -d $at_failed_list 2>&1 | tee -a $[0].log
AS_BOX([$[0].log is created])
+
+ echo
+ echo "Please send \`$[0].log' to <$at_bugreport> together with as"
+ echo 'information as you think might help.'
exit 1
fi
- 98-improve-testsuite-log.patch,
Akim Demaille <=