autoconf/tests
Pavel Roskin 4f28f9a62c * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more
argument, AUTOCONF-FLAGS.
* tests/mktests.sh (update_exclude_list): Add
AC_SYS_RESTARTABLE_SYSCALLS and AC_FUNC_WAIT3.
* tests/semantics.at: Test AC_SYS_RESTARTABLE_SYSCALLS and
AC_FUNC_WAIT3 with "-W no-obsolete".
2001-06-25 18:27:51 +00:00
..
.cvsignore More patterns. 2001-06-19 17:33:28 +00:00
acfunctions.at * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more 2001-06-25 18:27:51 +00:00
acgeneral.at * tests/atgeneral.m4 (AT_INIT): Include a default case for non 2001-01-22 09:03:38 +00:00
acheaders.at * tests/atgeneral.m4 (AT_INIT): Include a default case for non 2001-01-22 09:03:38 +00:00
aclang.at * tests/atgeneral.m4 (AT_INIT): Include a default case for non 2001-01-22 09:03:38 +00:00
aclocal.m4 * acgeneral.m4 (AC_VAR_SET, AC_VAR_GET, AC_VAR_TEST_SET) 2001-06-04 16:07:23 +00:00
acspecific.at * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more 2001-06-25 18:27:51 +00:00
actypes.at Create actypes.m4. 2001-01-22 09:04:58 +00:00
atconfig.in * tests/aclocal.m4: Fix some typos. Also ignore $PATH_SEPARATOR. 2001-03-13 12:43:14 +00:00
atgeneral.m4 * tests/atgeneral.m4 (AT_INIT): Remove "/bin/sh" after $SHELL. 2001-06-06 17:54:48 +00:00
atspecific.m4 * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more 2001-06-25 18:27:51 +00:00
base.at * tests/base.at: Adjust line numbers in error messages. 2001-05-31 07:04:30 +00:00
compile.at * tests/compile.at (AC_PROG_CPP via CC): Invoke AC_PROG_CC instead 2001-05-19 15:35:29 +00:00
foreign.at * tests/foreign.at (libtool): Fix the `libtoolize --version' decoding. 2001-06-25 11:57:14 +00:00
m4sh.at * tests/base.at, tests/m4sh.at: When using AC_PLAIN_SCRIPT be sure 2001-05-31 07:02:13 +00:00
m4sugar.at Require a perfect divert push/pop balance. 2001-01-18 09:16:08 +00:00
Makefile.am * autoconf.in, autoreconf.in, autoheader.in, autoscan.in, ifnames.in, 2001-05-22 14:04:22 +00:00
Makefile.in Move texinfo.tex from doc/ to config/. 2001-06-18 18:05:20 +00:00
mktests.sh * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more 2001-06-25 18:27:51 +00:00
README Improve tests/README. 2000-11-02 14:36:16 +00:00
semantics.at * tests/atspecific.m4 (AT_CHECK_MACRO): Accept one more 2001-06-25 18:27:51 +00:00
suite.at * acgeneral.m4 (AC_CHECK_LIB): Fix the cache var name to work 2001-06-06 15:03:29 +00:00
tools.at * config: New directory. 2001-05-22 14:43:48 +00:00
torture.at * tests/torture.at (AC_ARG_VAR): Make it a single test instead of 2001-06-23 17:14:34 +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.