autoconf/tests
Akim Demaille 0e30eb6fc9 * tests/semantics.at (AC_C_BIGENDIAN): Missing eol.
* bin/autoheader.in (%symbol): Strip arguments of macros.
2001-08-31 13:34:01 +00:00
..
.cvsignore * lib/autotest/general.m4: Use 2001-08-29 09:04:31 +00:00
acautoheader.at Regen. 2001-08-27 08:38:45 +00:00
acautoupdate.at Regen. 2001-08-27 08:38:45 +00:00
acc.at * configure.ac (AT_CONFIG): Fix the path. 2001-08-20 17:57:06 +00:00
acfortran.at * configure.ac (AT_CONFIG): Fix the path. 2001-08-20 17:57:06 +00:00
acfunctions.at * configure.ac (AT_CONFIG): Fix the path. 2001-08-20 17:57:06 +00:00
acgeneral.at Regen. 2001-08-27 08:38:45 +00:00
acheaders.at * configure.ac (AT_CONFIG): Fix the path. 2001-08-20 17:57:06 +00:00
aclang.at * configure.ac (AT_CONFIG): Fix the path. 2001-08-20 17:57:06 +00:00
aclibs.at Add. 2001-08-22 06:44:57 +00:00
aclocal.m4 * AUTHORS, BUGS, ChangeLog, ChangeLog.0, ChangeLog.1, 2001-08-12 13:05:11 +00:00
acprograms.at Add. 2001-08-22 06:44:57 +00:00
acspecific.at Add. 2001-08-22 06:44:57 +00:00
acstatus.at Regen. 2001-08-27 08:38:45 +00:00
actypes.at * configure.ac (AT_CONFIG): Fix the path. 2001-08-20 17:57:06 +00:00
atconfig.in * lib/autoconf/general.m4 (_AC_OUTPUT_COMMANDS): Say what you do. 2001-08-20 14:45:49 +00:00
atgeneral.m4 * atgeneral.m4 (AT_CHECK): Add a newline to the end of 2001-06-29 05:27:48 +00:00
atlocal.in * configure.ac: Also find tested executables in bin. 2001-08-31 13:30:11 +00:00
atspecific.m4 * lib/Autom4te/General.pm (&find_file, &update_file): New. 2001-08-31 13:32:35 +00:00
autoconf * bin/autoconf.in (--include, -I): New option. 2001-08-31 13:31:54 +00:00
autoheader * bin/autoheader.in: Rewrite in Perl. 2001-08-31 13:32:13 +00:00
autom4te * configure.ac: Also find tested executables in bin. 2001-08-31 13:30:11 +00:00
autoreconf * bin/autoconf.in (--include, -I): New option. 2001-08-31 13:31:54 +00:00
autoupdate * configure.ac: Also find tested executables in bin. 2001-08-31 13:30:11 +00:00
base.at * bin/autom4te.in (&handle_output): s/@__@/@&t@/. 2001-08-29 13:11:16 +00:00
compile.at * tests/base.at, tests/compile.at, tests/foreign.at, 2001-08-20 14:44:38 +00:00
foreign.at * tests/base.at, tests/compile.at, tests/foreign.at, 2001-08-20 14:44:38 +00:00
m4sh.at * bin/autom4te.in (&handle_output): s/@__@/@&t@/. 2001-08-29 13:11:16 +00:00
m4sugar.at * bin/autom4te.in (&handle_output): s/@__@/@&t@/. 2001-08-29 13:11:16 +00:00
Makefile.am * configure.ac: Also find tested executables in bin. 2001-08-31 13:30:11 +00:00
Makefile.in * bin/autoconf.in: Don't bother with acsite.m4' and aclocal.m4'. 2001-08-31 13:31:37 +00:00
mktests.sh * tests/base.at, tests/compile.at, tests/foreign.at, 2001-08-20 14:44:38 +00:00
README * ChangeLog, ChangeLog.0, ChangeLog.1, ChangeLog.2, AUTHORS, BUGS, 2001-08-20 15:16:54 +00:00
semantics.at * tests/semantics.at (AC_C_BIGENDIAN): Missing eol. 2001-08-31 13:34:01 +00:00
suite.at * lib/autoconf/general.m4 (AU_DEFINE, AU_DEFUN, AU_ALIAS): Move 2001-08-27 07:17:23 +00:00
tools.at * lib/Autom4te/General.pm ($version, $help, &getopt): New. 2001-08-31 13:33:10 +00:00
torture.at * tests/torture.at (Configuring subdirectories): New test. 2001-08-20 14:46:02 +00:00

							-*- outline -*-

This directory holds the M4sugar, M4sh and Autoconf test suites.


Here are a few rules on how to write tests.

* Order of the tests

It is extremely important to pay attention to the order of the tests.
There are basically two philosophies: (i) test earlier the most
critical features (hence hurried users will at least check those), or
(ii) test earlier the primitives.

For having tried both, I definitely recommend (ii).  In practice users
will run the whole test suite even if it's long.  And if they don't,
there will be enough other users who will do the job.

But also in practice some problems in the core of project can be
responsible for an incredible number of failures.  Then the problems
at the origin will be hidden by the consequences.  If dependencies are
properly ordered in the test suite (test features which depend upon
other features *after* having checked the latter), basically you'll
just have to pay attention to the first failures.  BTW, it also makes
`./testsuite -e' much more useful.


* Write tests!

Don't let you be bitten three times by the same dog!  When you spent a
significant amount of time tracking the failure of feature in some
more primitive problem, immediately write a test for the latter.

If you track down several bugs down to the same origin, write a test
especially for it.

Of course in both cases, more primitive tests will be run beforehand.
Write your test and have it failed before your fixing, and succeeding
after.  This usually means having at hand two copies of the source
tree, one running the test suite to have it fail, and the other to
have the same testsuite succeed.


* Autoconf

** Use of `exit'
Don't directly `exit 1' or `exit 77', rather use `AC_MSG_ERROR'.
First of all because when we have to read the test suite logs we are
happy to know why `configure' exited thanks to the error
message. Secondly, because `configure' traps the `exit' and pretty
many shells fail to set $? to 77 when trapping `exit 77'.  This
results in the test suite not being able to check the exit status.

** AC_MSG_ERROR
Of course, since macro names are forbidden in `configure', if you
really want to mention the macro name, you'll have to do without
including `A?_' in the output.

-----

Copyright 2000 Free Software Foundation, Inc.

This file is part of GNU Autoconf.

GNU Autoconf 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.

GNU Autoconf 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 autoconf; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.