From cba10f19330a923376e853cd8c4eb0795f7478d5 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 2 Aug 1997 20:11:56 +0000 Subject: [PATCH] use RUNTESTDEFAULTFLAGS --- ChangeLog | 3 +++ automake.texi | 17 ++++++++++++----- dejagnu.am | 7 +++++-- lib/am/dejagnu.am | 7 +++++-- 4 files changed, 25 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45702458..e2e8082b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Sat Aug 2 13:32:45 1997 Tom Tromey + * dejagnu.am (RUNTESTDEFAULTFLAGS): New macro. + (check-DEJAGNU): Use it. + * subdirs.am (maintainer-clean-recursive): Actually reverse subdir list. From Alexander Lukyanov. diff --git a/automake.texi b/automake.texi index 67302651..c26a2f71 100644 --- a/automake.texi +++ b/automake.texi @@ -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 diff --git a/dejagnu.am b/dejagnu.am index f8a7ad68..fbe09435 100644 --- a/dejagnu.am +++ b/dejagnu.am @@ -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 diff --git a/lib/am/dejagnu.am b/lib/am/dejagnu.am index f8a7ad68..fbe09435 100644 --- a/lib/am/dejagnu.am +++ b/lib/am/dejagnu.am @@ -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 -- 2.43.5