use RUNTESTDEFAULTFLAGS
authorTom Tromey <tromey@redhat.com>
Sat, 2 Aug 1997 20:12:00 +0000 (20:12 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 2 Aug 1997 20:12:00 +0000 (20:12 +0000)
ChangeLog
automake.texi
dejagnu.am
lib/am/dejagnu.am

index 4570245..e2e8082 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 Sat Aug  2 13:32:45 1997  Tom Tromey  <tromey@cygnus.com>
 
+       * dejagnu.am (RUNTESTDEFAULTFLAGS): New macro.
+       (check-DEJAGNU): Use it.
+
        * subdirs.am (maintainer-clean-recursive): Actually reverse subdir
        list.  From Alexander Lukyanov.
 
index 6730265..c26a2f7 100644 (file)
@@ -2111,11 +2111,18 @@ set @code{TESTS_ENVIRONMENT} to an invocation of the shell (eg
 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}; it defaults to the name of the package.  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.
+@code{runtest}; it defaults to the name of the package.
+
+The variable @code{RUNTESTDEFAULTFLAGS} holds the @code{--tool} and
+@code{--srcdir} flags that are passed to dejagnu by default; this can be
+overridden if necessary.
+@vindex RUNTESTDEFAULTFLAGS
+
+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
index f8a7ad6..fbe0943 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997 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
@@ -22,6 +22,9 @@ RUNTESTFLAGS =
 ## Name of tool to use.  Default is the same as the package.
 DEJATOOL = $(PACKAGE)
 
+## Default flags to pass to dejagnu.  The user can override this.
+RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+
 check-DEJAGNU: site.exp
 ## Life is easiest with an absolute srcdir, so do that.
        srcdir=`cd $(srcdir) && pwd`; export srcdir; \
@@ -36,6 +39,6 @@ CYGNUS        fi; \
 ## If runtest can't be found, print a warning but don't die.  It is
 ## pointless to cause a failure if the tests cannot be run at all.
        if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
-         $$runtest --tool $(DEJATOOL) --srcdir $$srcdir $(RUNTESTFLAGS); \
+         $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
        else echo "WARNING: could not find \`runtest'" 1>&2; :;\
        fi
index f8a7ad6..fbe0943 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997 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
@@ -22,6 +22,9 @@ RUNTESTFLAGS =
 ## Name of tool to use.  Default is the same as the package.
 DEJATOOL = $(PACKAGE)
 
+## Default flags to pass to dejagnu.  The user can override this.
+RUNTESTDEFAULTFLAGS = --tool $(DEJATOOL) --srcdir $$srcdir
+
 check-DEJAGNU: site.exp
 ## Life is easiest with an absolute srcdir, so do that.
        srcdir=`cd $(srcdir) && pwd`; export srcdir; \
@@ -36,6 +39,6 @@ CYGNUS        fi; \
 ## If runtest can't be found, print a warning but don't die.  It is
 ## pointless to cause a failure if the tests cannot be run at all.
        if $(SHELL) -c "$$runtest --version" > /dev/null 2>&1; then \
-         $$runtest --tool $(DEJATOOL) --srcdir $$srcdir $(RUNTESTFLAGS); \
+         $$runtest $(RUNTESTDEFAULTFLAGS) $(RUNTESTFLAGS); \
        else echo "WARNING: could not find \`runtest'" 1>&2; :;\
        fi