* tests/autotest.at (Erlang Eunit unit tests): Use "no" as
value-if-not-found for Erlang tools.
* tests/erlang.at: Likewise. Also, use AS_EXIT instead of plain
exit.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/autotest.at (Hard fail): Check more restrictively for
passed tests, so that hostnames recorded in the log file do not
wrongly match.
Report by Ludovic Courtès.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
These are lightweight versions of AT_CHECK that automatically
add the equivalent of ! in front of the command and change a
failure exit status to 77 resp. 99. They expand to just
two lines of shell code at the expense of not supporting
tracing (but then so does AT_XFAIL_IF).
2009-07-12 Paolo Bonzini <bonzini@gnu.org>
* NEWS: Mention AT_SKIP_IF and AT_FAIL_IF.
* doc/autoconf.texi (Autotest): Document them.
* lib/autotest/general.m4 (_AT_LINE_ESCAPED, AT_SKIP_IF,
AT_FAIL_IF, _AT_CHECK_EXIT): New.
(AT_CHECK): Use _AT_LINE_ESCAPED.
* tests/autotest.st: Add tests for AT_SKIP_IF and AT_FAIL_IF.
Use AT_SKIP_IF.
* tests/local.st: Use AT_SKIP_IF.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Skip test if set -m
is not supported.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <AT_JOB_FIFO_FD>: Avoid <>;
instead open write descriptor in each group and read descriptor in
main driver.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Relax condition.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <driver loop>: Avoid syntax
errors on shells that don't recognize <>.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Also skip parallel
tests for this reason. Skip based on the shell to be tested,
not the shell driving the testsuite.
(parallel syntax error): Rearrange similar to previous patch.
(parallel test execution): Defer skip until after serial tests.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (Syntax error): Skip test if shell aborts on
syntax error (AIX ksh88) or doesn't detect it (zsh).
* doc/autoconf.texi (Limitations of Builtins) <.>: Mention these
limitations.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_CHECK): Expand prior to adding
escapes, to avoid shell syntax errors caused by late macro
expansion.
* NEWS: Document this change.
* tests/autotest.at (Metacharacters in command from M4 expansion):
New test.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Keep older,
undocumented semantics, where unbalanced " cannot be used in the
stdout/stderr argument.
(AT_CHECK_UNQUOTED): Treat " in stdout/stderr as a literal, since
the text is used in double-quoted context.
* tests/autotest.at (unquoted output): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Mention which
shell expansions are handled.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (_AT_DECIDE_TRACEABLE): Handle # in
test correctly. Latent bug in handling shell comment was first
fixed 2008-11-20, but regressed two patches later.
* tests/autotest.at (Shell comment in command): New test.
* NEWS: Document the fix.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <at_fn_group_postprocess>:
Guarantee test failure on syntax error, rather than inheriting
status from previous test.
* tests/autotest.at (Syntax error): New test.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (AT_CHECK_AT): Add pre-test argument.
(Tested programs, Startup error messages, AT_CHECK_AT_TITLE)
(Fallacy, Skip, errexit, Long test source lines)
(Debugging a successful test, Debugging script and environment)
(Debugging a failed test, Using atlocal)
(Choosing where testsuite is run): Adjust callers.
(AT_SKIP_PARALLEL_TESTS): New macro, to skip parallel tests except
under zsh, bash, or when TEST_PARALLEL_AUTOTEST is defined. Makes
it easier to avoid testsuite hangs for users with dash or other
less-tested shell.
(parallel test execution, parallel truth, parallel fallacy)
(parallel skip, parallel errexit)
(parallel autotest and signal handling): Use it.
* BUGS: Mention this.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (Driver loop): Rewrite signal handler.
Start parallel jobs in their own process group, enabling job
control in the shell if possible, for better signal handling.
Deal with INT, TERM, and HUP in the testsuite driver. In the
parallel driver, propagate TSTP to jobs either as TSTP or as
STOP (to avoid fork bombs with ksh).
Inside the job processes, add PIPE handler to write back the
job token, so the master process does not hang.
Disable the parallel driver if job control is not provided or if
trap does not understand signal names.
* tests/autotest.at (parallel autotest and signals): New test,
exercises INT, TERM, and PIPE, serial and parallel, with and
without `make' in the loop.
Kudos to Richard Stevens for writing APUE.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_prepare_dynamic>:
Fix typo.
* NEWS: Clarify the potential impact to users.
* tests/autotest.at (AT_DATA_AUTOTEST): New macro, patterned after
AT_DATA_M4SUGAR.
(AT_CHECK_AT_PREP, AT_CHECK_AT_TITLE): Use it.
(unusual file names): Test that the recent echo fix does not
regress. Fix quoting bug that made the test a no-op.
Reported by Paolo Bonzini and Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AS_MESSAGE_LOG_FD, AT_JOB_FIFO_FD):
Define fds only when initializing the log fd so early error
messages do not try to write to it.
* tests/autotest.at (Startup error messages): New test.
* NEWS: Document this 2.63 regression.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autotest/general.m4: Use the serial code path if no test
is to be run.
* tests/autotest.at (parallel test execution): Test -j and -jN
with `-k notmatched'.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autotest/general.m4 (AT_JOB_FIFO_FD): New macro.
(AT_INIT): <at_jobs>: New variable.
Accept -j, -jN, --jobs[=N], document them in --help output.
Implement parallel driver loop using a FIFO, enabled with --jobs
and if mkfifo works; otherwise, fall back to sequential loop.
(AT_SETUP): Store, do not output summary progress line if
parallel.
* tests/autotest.at (parallel test execution, parallel truth)
(parallel fallacy, parallel skip): New tests.
* doc/autoconf.texi (testsuite Invocation): Document -j, --jobs,
the mkfifo requirement, and that --errexit may cause concurrent
jobs to finish.
* NEWS: Update.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autotest/general.m4 (AT_KEYWORDS): Expand argument prior to
converting it to lower case.
* tests/autotest.at (Keywords and ranges): Test this.
* NEWS: Document the fix.
* THANKS: Update.
Reported by Karsten Hopp.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <at_func_validate_ranges>:
Alter usage to eval its arguments, in order to normalize away
leading zero. All callers updated.
* tests/autotest.at (Keywords and ranges): Test range
normalization with leading 0.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_expand, _m4_expand): Use more complex
quotes.
(m4_noquote, _m4_split): Use consistent complex quote.
* tests/autotest.at (Left paren, Right paren): Test this.
(Parentheses): Ensure new quadrigraphs still work.
(AT_CHECK_AT_TITLE_CHAR): All title char tests exercise m4_expand.
* NEWS: Mention the fix.
* doc/autoconf.texi (Quadrigraphs): Revert mention of macros that
require quadrigraphs for ().
(Evaluation Macros) <m4_expand>: Relax the restriction against
unbalanced ().
(Pretty Help Strings) <AS_HELP_STRING>: Likewise.
(Writing Testsuites) <AT_SETUP>: Likewise.
Reported by Joel E. Denny, fix suggested by Noah Misch.
Signed-off-by: Eric Blake <ebb9@byu.net>
* bin/autom4te.in (handle_output): Substitute @{:@ and @:}@.
(handle_traces): Likewise.
* lib/m4sugar/m4sugar.m4 (m4_qlen): Account for new quadrigraphs.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Add new tests.
* doc/autoconf.texi (Quadrigraphs): Document them.
(Evaluation Macros) <m4_expand>: Enhance documentation.
(Text processing Macros) <m4_text_box>: Document cases where
quadrigraphs can help for problemetic unbalanced parentheses.
(Pretty Help Strings) <AS_HELP_STRING>: Likewise.
(Writing Testsuites) <AT_SETUP>: Likewise.
(Limitations of Builtins) <case>: Consolidate text on unbalanced
parentheses, and add an example of creative comments.
* NEWS: Document the addition.
Reported by Joel E. Denny.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (AT_CHECK_AT): Allow to pass additional
arguments to the inner suite.
(errexit, input from stdin): New tests.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Return back to GPLv2+, until the text of the exceptions is
finalized, reverting the change from 2007-07-03 and the first
part of the change from 2007-07-20.
Also:
* COPYING: Revert to GPLv2.
* COPYINGv3: New file, since some auxiliary build tools, used for
building autoconf and not installed, are GPLv3.
* Makefile.am (EXTRA_DIST): Distribute COPYINGv3.
* NEWS: Remove mention of GPLv3.
* README: Clarify situation regarding GPLv3.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (_AT_DEFINE_INIT, _AT_DEFINE_SETUP): New
macros for defining order-enforced macros.
(AT_INIT, AT_SETUP, AT_CLEANUP, AT_BANNER, AT_XFAIL_IF)
(AT_CAPTURE_FILE, AT_DATA, AT_CHECK, AT_CHECK_NOESCAPE): Add error
messages when order violations are detected.
* tests/autotest.at (AT_CHECK_AT_SYNTAX): New helper macro.
(AT_SETUP without AT_INIT, AT_BANNER without AT_INIT)
(AT_CLEANUP without AT_INIT, Missing AT_CLEANUP)
(AT_CHECK without AT_SETUP, AT_DATA without AT_SETUP)
(AT_XFAIL_IF without AT_DATA, AT_KEYWORDS without AT_SETUP,
(AT_CLEANUP without AT_SETUP, AT_BANNER inside AT_SETUP)
(AT_SETUP inside AT_SETUP, Multiple AT_INIT)
(Banner-only test suite): New tests.
Reported by Christopher Hulbert.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (AT_CHECK_AT_PREP): Avoid raw AT_ in output.
(unusual file names): Likewise.
(m4_pattern_allow): Remove loophole, to make it easier to catch
poorly written tests.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (AT_CHECK_AT_PREP): New macro, to factor out
common initialization.
(AT_CHECK_AT, Banners, Keywords and ranges, srcdir propagation)
(whitespace in absolute testdir, unusual file names): Use it.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT): Fix --clean to work
again, broken since introduction of `-C dir'.
* tests/autotest.at (Choosing where testsuite is run): Test it.
* lib/autotest/general.m4 (AT_LINE): Fix regression from
2007-10-04 when file name is `dnl'.
(AT_INIT) <PREPARE_TESTS>: Move command-line assignments...
<TESTS_BEGIN>: ...to this new diversion, to fix regression from
yesterday in libtool's testsuite.
(_AT_ARG_OPTION): Detect write failure.
* doc/autoconf.texi (Diversion support): Document PREPARE_TESTS to
make libtool's use kosher. Document m4_init.
(Programming in M4sh): Document AS_INIT.
(Writing Testsuites): Document limitation of AT_DATA file name.
* tests/autotest.at (unusual file names): New test.
(Banners, Keywords and ranges): Use correct shell.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <PREPARE_TESTS): Fix quoting
bug.
<PARSE_ARGS_END>: Also detect leading digits in assignments.
* tests/autotest.at (Using atlocal): Enhance test to catch last
bug.
Signed-off-by: Eric Blake <ebb9@byu.net>