autoconf/tests
2000-11-10 14:43:33 +00:00
..
.cvsignore More stuff to ignore: config.h config.hin experr expout state* 2000-10-30 16:47:42 +00:00
aclocal.m4 * tests/aclocal.m4 (AC_ENV_SAVE): Rename to ... 2000-10-25 11:47:20 +00:00
atconfig.in * m4/atconfig.m4 (AT_CONFIG): s/AT_TESTPATH/AUTOTEST_PATH/ 2000-11-02 16:12:15 +00:00
atgeneral.m4 * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Use ":" instead of 2000-11-09 18:59:18 +00:00
atspecific.m4 * m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros. 2000-11-03 08:53:26 +00:00
base.at AC_CONFIG_AUX_DIR_DEFAULTS overrides AC_CONFIG_AUX_DIR. Ouch. 2000-11-03 16:02:54 +00:00
m4sh.at * tests/m4sh.at (Negated classes in globbing): New test. 2000-11-10 14:43:33 +00:00
m4sugar.at * tests/m4sugar.at (m4_warn): Adjusted to accept stack dump when 2000-11-09 18:50:55 +00:00
Makefile.am Use AC_MSG_ERROR in the test suite, not just `exit'. 2000-10-27 14:15:28 +00:00
Makefile.in Use AC_MSG_ERROR in the test suite, not just `exit'. 2000-10-27 14:15:28 +00:00
mktests.sh * aclang.m4 (ac_cv_prog_gcc, ac_cv_prog_gxx, ac_cv_prog_g77): 2000-11-07 14:16:54 +00:00
README Improve tests/README. 2000-11-02 14:36:16 +00:00
semantics.at * acgeneral.m4 (AU_ALIAS): Don't forget to pass the arguments to 2000-11-03 11:59:39 +00:00
suite.at * tests/suite.at: Move "-*- Autoconf -*-" to the second line. 2000-10-27 14:43:44 +00:00
syntax.at m4_syscmd was reestablished as syscd' intead of syscmd' because 2000-11-07 11:49:35 +00:00
tools.at * tests/tools.at (Syntax of the scripts): Check "autoreconf" 2000-11-09 19:13:23 +00:00
torture.at * m4sugar.m4 (m4_rename_m4, m4_copy_unm4): New macros. 2000-11-03 08:53:26 +00:00
update.at m4_syscmd was reestablished as syscd' intead of syscmd' because 2000-11-07 11:49:35 +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.