summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>1996-05-25 16:38:12 +0000
committerTom Tromey <tromey@redhat.com>1996-05-25 16:38:12 +0000
commit2ed82e7f6696df7d2da9ec0f78708ff6fb5a61fd (patch)
tree7cc0566468884b403f8f64cb6fd62dd2c1562b33
parent1a4f3fb76794d7fa7d5bcb70f947d080e37fee19 (diff)
downloadautomake-2ed82e7f6696df7d2da9ec0f78708ff6fb5a61fd.tar.gz
Added support for DejaGNU
-rw-r--r--ChangeLog7
-rw-r--r--Makefile.am19
-rw-r--r--Makefile.in19
-rw-r--r--NEWS1
-rw-r--r--TODO3
-rwxr-xr-xautomake.in38
-rw-r--r--automake.texi35
-rw-r--r--dejagnu.am47
-rw-r--r--lib/am/Makefile.am19
-rw-r--r--lib/am/dejagnu.am47
-rw-r--r--version.texi2
11 files changed, 175 insertions, 62 deletions
diff --git a/ChangeLog b/ChangeLog
index a3d46900a..fe6f1b128 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sat May 25 10:19:53 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * automake.in (handle_tests): Handle dejagnu.
+ (handle_options): Recognize dejagnu option.
+
+ * dejagnu.am: New file.
+
Thu May 23 10:01:13 1996 Tom Tromey <tromey@creche.cygnus.com>
* automake.in (handle_dist): Run installcheck target from
diff --git a/Makefile.am b/Makefile.am
index b89d31629..39c660a36 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -12,18 +12,13 @@ info_TEXINFOS = automake.texi
# CONFIG_HEADER = config.h
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
-compile.am data.am depend.am \
-dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am \
-libraries.am library.am mans-vars.am \
-program.am programs.am remake-hdr.am \
-remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
-tags-clean.am \
-texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am programs-clean.am data-clean.am \
-COPYING INSTALL texinfo.tex \
-ansi2knr.c ansi2knr.1 \
-aclocal.m4
+compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
+header.am header-vars.am kr-vars.am libraries.am library.am \
+mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
+remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
+texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
+programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
+ansi2knr.1 aclocal.m4
## These must all be executable when installed.
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
diff --git a/Makefile.in b/Makefile.in
index 9dc966cc0..315a6787b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -50,18 +50,13 @@ info_TEXINFOS = automake.texi
# CONFIG_HEADER = config.h
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
-compile.am data.am depend.am \
-dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am \
-libraries.am library.am mans-vars.am \
-program.am programs.am remake-hdr.am \
-remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
-tags-clean.am \
-texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am programs-clean.am data-clean.am \
-COPYING INSTALL texinfo.tex \
-ansi2knr.c ansi2knr.1 \
-aclocal.m4
+compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
+header.am header-vars.am kr-vars.am libraries.am library.am \
+mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
+remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
+texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
+programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
+ansi2knr.1 aclocal.m4
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
diff --git a/NEWS b/NEWS
index 1f67887c7..c35db3004 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
New in 0.34:
* Bug fixes
* distcheck target runs install and installcheck targets
+* Added support for DejaGNU.
New in 0.33:
* More bug fixes
diff --git a/TODO b/TODO
index 02a11893a..6f1c0d44e 100644
--- a/TODO
+++ b/TODO
@@ -86,9 +86,6 @@ Need way to say there are no suffixes in a Makefile (Franc,ois'
Check to make sure various scripts are executable (IE when looking for
them in a directory)
-Testing: allow support for Cygnus-style dejagnu-based test suites via
-an option
-
Think about ways to make automake fit better with Cygnus-style trees.
Use recode in dist target when MAINT_CHARSET specified. Read caveats
diff --git a/automake.in b/automake.in
index 8abc526d5..5cda40a54 100755
--- a/automake.in
+++ b/automake.in
@@ -430,7 +430,8 @@ sub handle_options
&set_strictness ($_);
}
elsif ($_ eq 'no-installman' || $_ eq 'ansi2knr'
- || $_ eq 'dist-shar' || $_ eq 'dist-zip')
+ || $_ eq 'dist-shar' || $_ eq 'dist-zip'
+ || $_ eq 'dejagnu')
{
# Explicitly recognize these.
}
@@ -1890,18 +1891,32 @@ sub handle_phony
$output_rules .= "\n";
}
-# Handle TESTS variable.
+# Handle TESTS variable and other checks.
sub handle_tests
{
- return if ! &variable_defined ('TESTS');
-
- push (@check, 'check-TESTS');
- push (@phony, 'check-TESTS');
- # FIXME use $(SHELL) here? That is what Ulrich suggests. Maybe a
- # new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)? For now we just
- # execute the file directly; this allows test files which are
- # compiled -- a possibly useful feature.
- $output_rules .= 'check-TESTS: $(TESTS)
+ if (&variable_defined ('DEJATOOL') && ! defined $options{'dejagnu'})
+ {
+ # Error.
+ &am_line_error ('DEJATOOL',
+ "\`DEJATOOL' defined but \`dejagnu' not in \`AUTOMAKE_OPTIONS'");
+ return;
+ }
+
+ if (defined $options{'dejagnu'})
+ {
+ push (@check, 'check-DEJAGNU');
+ push (@phony, 'check-DEJAGNU');
+ $output_rules .= &file_contents ('dejagnu');
+ }
+ elsif (&variable_defined ('TESTS'))
+ {
+ push (@check, 'check-TESTS');
+ push (@phony, 'check-TESTS');
+ # FIXME use $(SHELL) here? That is what Ulrich suggests.
+ # Maybe a new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)? For
+ # now we just execute the file directly; this allows test
+ # files which are compiled -- a possibly useful feature.
+ $output_rules .= 'check-TESTS: $(TESTS)
@failed=0; all=0; \\
srcdir=$(srcdir); export srcdir; \\
for tst in $(TESTS); do \\
@@ -1923,6 +1938,7 @@ sub handle_tests
echo "$$failed of $$all tests failed"; \\
fi
';
+ }
}
################################################################
diff --git a/automake.texi b/automake.texi
index cd58189d4..5533ce816 100644
--- a/automake.texi
+++ b/automake.texi
@@ -1070,17 +1070,30 @@ makes a distribution, and then tries to do a @code{VPATH} build.
@node Tests
@chapter Support for test suites
-Automake supports a simple form of test suite. If the variable
-@code{TESTS} is defined, its value is taken to be a list of programs to
-run in order to do the testing. The programs can either be derived
-objects or source objects; the generated rule will look both in
-@var{srcdir} and @file{.}.
-
-The testing is done via @samp{make check}. The number of failures will
-be printed at the end of the run.
-
-In the future there will be some support for test suites which use
-@code{DejaGnu}.
+Automake supports a two forms of test suite.
+
+If the variable @code{TESTS} is defined, its value is taken to be a list
+of programs to run in order to do the testing. The programs can either
+be derived objects or source objects; the generated rule will look both
+in @var{srcdir} and @file{.}. The number of failures will be printed at
+the end of the run.
+
+If @samp{dejagnu} appears in @code{AUTOMAKE_OPTIONS}, then the a
+@code{dejagnu}-based test suite is assumed. The value of the variable
+@code{DEJATOOL} is passed as the @code{--tool} argument to
+@code{runtest}. The variables @code{EXPECT}, @code{RUNTEST} and
+@code{RUNTESTFLAGS} can also be overridden to provide project-specific
+values. For instance, you will need to do this if you are testing a
+compiler toolchain, because the default values do not take into account
+host and target names.
+@opindex dejagnu
+@vindex DEJATOOL
+@vindex EXPECT
+@vindex RUNTEST
+@vindex RUNTESTFLAGS
+@c FIXME xref dejagnu
+
+In either case, the testing is done via @samp{make check}.
@node Options
diff --git a/dejagnu.am b/dejagnu.am
new file mode 100644
index 000000000..cbd86b2b2
--- /dev/null
+++ b/dejagnu.am
@@ -0,0 +1,47 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994, 1995, 1996 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
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+## Work if expect is in our tree.
+EXPECT = ` \
+ if [ -f $$rootme/../expect/expect ] ; then \
+ echo $$rootme/../expect/expect ; \
+ else echo expect ; fi`
+
+## If DejaGNU is in our tree, we must run it out of srcdir.
+RUNTEST = ` \
+ if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
+ echo $(top_srcdir)/../dejagnu/runtest ; \
+ else echo runtest ; fi`
+
+## Flags for DejaGNU.
+RUNTESTFLAGS =
+
+## Name of tool to use. Default is the same as the package.
+DEJATOOL = $(PACKAGE)
+
+check-DEJAGNU:
+ rootme=`cd $(top_builddir) && pwd`; \
+## Life is easiest with an absolute srcdir, so do that.
+ srcdir=`cd $(srcdir) && pwd`; export srcdir; \
+ EXPECT=$(EXPECT); export EXPECT; \
+## Allow this to work when expect and DejaGNU are in tree.
+ if [ -f $$rootme/../expect/expect ]; then \
+ TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
+ export TCL_LIBRARY; \
+ fi; \
+ $(RUNTEST) --tool $(DEJATOOL) --srcdir $$srcdir $(RUNTESTFLAGS)
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
index b89d31629..39c660a36 100644
--- a/lib/am/Makefile.am
+++ b/lib/am/Makefile.am
@@ -12,18 +12,13 @@ info_TEXINFOS = automake.texi
# CONFIG_HEADER = config.h
pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
-compile.am data.am depend.am \
-dist-vars.am footer.am header.am header-vars.am \
-kr-vars.am \
-libraries.am library.am mans-vars.am \
-program.am programs.am remake-hdr.am \
-remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \
-tags-clean.am \
-texi-version.am texinfos-vars.am texinfos.am \
-libraries-clean.am programs-clean.am data-clean.am \
-COPYING INSTALL texinfo.tex \
-ansi2knr.c ansi2knr.1 \
-aclocal.m4
+compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
+header.am header-vars.am kr-vars.am libraries.am library.am \
+mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
+remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
+texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
+programs-clean.am data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c \
+ansi2knr.1 aclocal.m4
## These must all be executable when installed.
pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs
diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am
new file mode 100644
index 000000000..cbd86b2b2
--- /dev/null
+++ b/lib/am/dejagnu.am
@@ -0,0 +1,47 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1994, 1995, 1996 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
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+## Work if expect is in our tree.
+EXPECT = ` \
+ if [ -f $$rootme/../expect/expect ] ; then \
+ echo $$rootme/../expect/expect ; \
+ else echo expect ; fi`
+
+## If DejaGNU is in our tree, we must run it out of srcdir.
+RUNTEST = ` \
+ if [ -f $(top_srcdir)/../dejagnu/runtest ] ; then \
+ echo $(top_srcdir)/../dejagnu/runtest ; \
+ else echo runtest ; fi`
+
+## Flags for DejaGNU.
+RUNTESTFLAGS =
+
+## Name of tool to use. Default is the same as the package.
+DEJATOOL = $(PACKAGE)
+
+check-DEJAGNU:
+ rootme=`cd $(top_builddir) && pwd`; \
+## Life is easiest with an absolute srcdir, so do that.
+ srcdir=`cd $(srcdir) && pwd`; export srcdir; \
+ EXPECT=$(EXPECT); export EXPECT; \
+## Allow this to work when expect and DejaGNU are in tree.
+ if [ -f $$rootme/../expect/expect ]; then \
+ TCL_LIBRARY=`cd $(top_srcdir)/../tcl/library && pwd`; \
+ export TCL_LIBRARY; \
+ fi; \
+ $(RUNTEST) --tool $(DEJATOOL) --srcdir $$srcdir $(RUNTESTFLAGS)
diff --git a/version.texi b/version.texi
index 59e8eed7d..a0b200a06 100644
--- a/version.texi
+++ b/version.texi
@@ -1,3 +1,3 @@
-@set UPDATED 17 May 1996
+@set UPDATED 25 May 1996
@set EDITION 0.34
@set VERSION 0.34