Commit Graph

93 Commits

Author SHA1 Message Date
Ralf Wildenhues
5d38833a3d testsuite: pass $configure_options to configure invocations.
* tests/local.at (AT_CHECK_CONFIGURE): Add $configure_options
to configure command line.
* tests/autotest.at, tests/base.at, tests/c.at, tests/torture.at:
Likewise for each configure invocation.
* README-hacking: Document configure_options.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-09-14 19:30:22 +02:00
Ralf Wildenhues
83989941d3 testsuite: improve Erlang tests portability, overridability.
* 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>
2009-09-14 19:29:35 +02:00
Ralf Wildenhues
675a0c95df Update License to GPLv3+ including new Autoconf Exception.
* NEWS, README: Update licensing information.
* COPYING.EXCEPTION: New file.
* Makefile.am (EXTRA_DIST): Distribute it.
* cfg.mk (autom4te-update): Remove copyright change warning.
* lib/autoconf/autoconf.m4, lib/autoconf/autoheader.m4,
lib/autoconf/autoscan.m4, lib/autoconf/autotest.m4,
lib/autoconf/autoupdate.m4, lib/autoconf/c.m4,
lib/autoconf/erlang.m4, lib/autoconf/fortran.m4,
lib/autoconf/functions.m4, lib/autoconf/general.m4,
lib/autoconf/headers.m4, lib/autoconf/lang.m4,
lib/autoconf/libs.m4, lib/autoconf/oldnames.m4,
lib/autoconf/programs.m4, lib/autoconf/specific.m4,
lib/autoconf/status.m4, lib/autoconf/types.m4,
lib/autotest/autotest.m4, lib/autotest/general.m4,
lib/autotest/specific.m4, lib/m4sugar/foreach.m4,
lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4: Update exception
statement, bump to GPLv3.
* bin/autoconf.as, bin/autoheader.in, bin/autom4te.in,
bin/autoreconf.in, bin/autoscan.in, bin/autoupdate.in,
bin/ifnames.in: Bump to GPLv3+, adjust --version output
to reflect the GPLv3+ and the Autoconf Exception.
* lib/Autom4te/C4che.pm, lib/Autom4te/ChannelDefs.pm,
lib/Autom4te/General.pm, lib/Autom4te/Request.pm,
lib/autom4te.in, lib/autoscan/autoscan.pre,
lib/emacs/autoconf-mode.el, lib/emacs/autotest-mode.el,
lib/freeze.mk, tests/atlocal.in, tests/autoscan.at,
tests/autotest.at, tests/base.at, tests/c.at,
tests/compile.at, tests/erlang.at, tests/foreign.at,
tests/fortran.at, tests/local.at, tests/m4sh.at,
tests/m4sugar.at, tests/mktests.sh, tests/semantics.at,
tests/statesave.m4, tests/suite.at, tests/tools.at,
tests/torture.at, tests/wrapper.as: Bump to GPLv3+.
2009-09-09 19:53:31 +02:00
Ralf Wildenhues
1c17608e79 Drop unneeded line in Eunit test.
* tests/autotest.at (Erlang Eunit unit tests): Do not copy
install-sh.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-08-22 10:45:10 +02:00
Paolo Bonzini
c6aa493da4 Fix testsuite log capturing for tests 183 and 186.
* tests/autotest.at (AT_CHECK_AT_PREP): Prepend AT_dir to
testsuite log file for AT_CAPTURE_FILE.
2009-08-12 12:22:14 +02:00
Paolo Bonzini
683a0f1df7 Fix grep invocation in Erlang test.
* tests/autotest.at (Erlang Eunit unit tests): Fix grep invocation.
2009-08-02 08:24:48 +02:00
Romain Lenglet
dab22fbfe1 add AT_CHECK_EUNIT autotest macro
* lib/autotest/specific.m4: New file.
* lib/autotest/Makefile.am (dist_autotestlib_DATA): Add specific.m4.
* lib/autoconf/autotest.m4 (AC_CONFIG_TESTDIR): Add definitions of
variables used by AT_CHECK_EUNIT macro: ERL, ERLC, ERLCFLAGS.
* tests/autotest.at (Erlang Eunit unit tests): Add test for macro
AT_CHECK_EUNIT.
* doc/autoconf.texi (Writing Testsuites): Document macro AT_CHECK_EUNIT.
* NEWS: Mention macro AT_CHECK_EUNIT.
2009-08-02 08:20:57 +02:00
Ralf Wildenhues
4de8e583dd testsuite: avoid bogus hostname match from inner test logs.
* 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>
2009-07-29 19:54:57 +02:00
Eric Blake
2b5b0dda48 Guarantee that exit status trumps output matching.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document this
better.
* tests/autotest.at (Skip, parallel skip): Enhance tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-07-13 22:03:27 -06:00
Paolo Bonzini
ac0fd199f9 introduce AT_SKIP_IF and AT_FAIL_IF
* 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.
2009-07-13 21:46:08 +02:00
Paolo Bonzini
877876da7c revert previous push 2009-07-13 13:39:25 +02:00
Paolo Bonzini
967cf4d282 introduce AT_SKIP_IF and AT_FAIL_IF
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.
2009-07-12 16:31:14 +02:00
Ralf Wildenhues
9c25a39c54 Ignore messages on stderr when testing for the zsh issue.
* tests/autotest.at (AT_SKIP_PARALLEL_TESTS): Ignore stderr.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2009-07-09 08:19:21 +02:00
Eric Blake
9a15f2f077 Skip parallel tests when zsh 'set -m' fails.
* 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>
2009-07-07 23:01:23 -06:00
Eric Blake
26f07a3351 Make parallel testsuite more portable.
* 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>
2009-07-07 22:42:50 -06:00
Eric Blake
1ba58ec955 Avoid syntax error in ash.
* 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>
2009-07-03 06:42:30 -06:00
Eric Blake
596644ca29 Skip test on shells that can't catch syntax failure.
* 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>
2009-07-02 07:17:43 -06:00
Eric Blake
3bec0c1d32 Fix quoting of m4 macros in AT_CHECK.
* 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>
2009-04-24 13:15:31 -06:00
Eric Blake
5da9f24d55 Make AT_CHECK_UNQUOTED more like AC_DEFINE_UNQUOTED.
* 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>
2009-04-24 13:15:25 -06:00
Eric Blake
bcb6b3180d Rename AT_CHECK_NOESCAPE to AT_CHECK_UNQUOTED.
* lib/autotest/general.m4 (AT_CHECK_NOESCAPE): Deprecate, in favor
of new spelling...
(AT_CHECK_UNQUOTED): ...for consistency with AC_DEFINE_UNQUOTED.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
rename.
* NEWS: Likewise.
* tests/autotest.at (Binary output, Cleanup): Adjust tests.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-24 13:15:22 -06:00
Eric Blake
7ece247bdd Test that autotest handles binary output.
* tests/autotest.at (Binary output): New test.
Suggested by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:38:58 -06:00
Eric Blake
c241057ad4 Add stdout-nolog and ignore-nolog to AT_CHECK.
* lib/autotest/general.m4 (AT_DIFF_STDERR(stderr-nolog))
(AT_DIFF_STDERR(ignore-nolog), AT_DIFF_STDOUT(stdout-nolog))
(AT_DIFF_STDOUT(ignore-nolog)): New macros.
* tests/autotest.at (Logging): New test.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document the
new logging actions.
* NEWS: Likewise.
Reported by Ralf Wildenhues.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:56 -06:00
Eric Blake
e8f34dca8c Teach AT_CHECK about hard failures.
* lib/autotest/general.m4 (AT_INIT) <at_fn_check_skip>
<at_fn_check_status, at_fn_group_postprocess>: Handle hard
failures.
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Document
AT_CHECK_NOESCAPE and exit status 99.
* NEWS: Likewise.
* tests/autotest.at (Hard fail, Cleanup): New tests.

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-15 06:00:24 -06:00
Eric Blake
08fdbe95ea Test parallel handling of syntax error.
* tests/autotest.at (parallel syntax error): New test.
Suggested by Ralf Wildenhues

Signed-off-by: Eric Blake <ebb9@byu.net>
2009-04-10 13:16:18 -06:00
Eric Blake
c283f62edb Handle shell comments in AT_CHECK.
* 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>
2009-04-06 20:52:44 -06:00
Eric Blake
57e6f69b99 Hard fail any test with syntax errors.
* 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>
2009-04-06 20:52:41 -06:00
Eric Blake
d46e5d6844 For now, skip parallel tests under less-tested shells.
* 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>
2009-03-30 08:11:09 -06:00
Ralf Wildenhues
36ee23e298 Fix a couple of test failures with dash.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Normalize
exit status of `cd'.
* tests/m4sh.at (AS_MESSAGE_LOG_FD): Remove script before
regeneration, to avoid timing effects.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-27 20:02:34 +01:00
Ralf Wildenhues
12ec1304fc More reliable signal handling in Autotest.
* 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>
2008-11-23 20:00:39 +01:00
Eric Blake
a8a9b2148d Fix typos in recent testsuite improvements.
* 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>
2008-11-21 13:36:27 -07:00
Eric Blake
79042ea346 Fix XFAIL related to AT_CHECK.
* lib/autotest/general.m4 (AT_CHECK, AT_CHECK_UNQUOTED): Expand
first argument once.
(_AT_CHECK): Don't re-expand commands.
* tests/autotest.at (Multiline command from M4 expansion): Remove
XFAIL.
* tests/tools.at (autoupdating AU_ALIAS): Quote unbalanced paren.
* NEWS: Document the fallout.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-20 18:27:35 -07:00
Eric Blake
7791129655 Improve m4_expand robustness, part 2.
* lib/m4sugar/m4sugar.m4 (m4_expand): Support unterminated
comments, by wrapping old implementation...
(_m4_expand): ...as this, and renaming old core...
(_m4_expand_): ...to this.
(m4_text_box): Use lighter-weight _m4_expand.
* lib/m4sugar/m4sh.m4 (_AS_DETECT_EXPAND)
(_AS_DETECT_BETTER_SHELL, AS_FUNCTION_DESCRIBE): Likewise.
* lib/autotest/general.m4 (AT_KEYWORDS): Likewise.
* tests/m4sugar.at (m4@&t@_expand): Enhance test.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Likewise.
* doc/autoconf.texi (Evaluation Macros) <m4_expand>: Mention new
functionality.

Signed-off-by: Eric Blake <ebb9@byu.net>
2008-11-20 16:05:04 -07:00
Ralf Wildenhues
1b1851ea3a Wrap keywords in `testsuite --list' output.
* lib/autotest/general.m4 (AT_INIT): Rewrite --list awk script,
avoid lint warnings from gawk, wrap keyword lists to stay below
80 characters per line if possible.
* tests/autotest.at (Keyword wrapping): New test.

Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-11-12 23:54:01 +01:00
Ralf Wildenhues
4da97747ef Do not write to testsuite log fd before initialization.
* 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>
2008-10-08 07:24:06 +02:00
Ralf Wildenhues
22e3751d19 Fix more testsuite hang corner cases.
* 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>
2008-10-03 07:21:25 +02:00
Ralf Wildenhues
f108ed8925 Implement parallel Autotest test execution: testsuite --jobs.
* 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>
2008-10-02 07:52:25 +02:00
Eric Blake
3ac7ceb0c2 Fix regression in AT_KEYWORDS([Macro]), from 2007-10-18.
* 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>
2008-06-05 15:18:11 -06:00
Eric Blake
d92dcf1e03 Improve behavior of './testsuite 01'.
* 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>
2008-05-06 06:17:41 -06:00
Eric Blake
4d953cea64 Allow unbalanced () in m4_expand.
* 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>
2008-04-23 09:32:05 -06:00
Eric Blake
c60735fbb8 Support unbalanced () in AT_SETUP by adding two new quadrigraphs.
* 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>
2008-04-22 16:28:14 -06:00
Ralf Wildenhues
c1cd13960d New tests: errexit, input from stdin.
* 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>
2008-04-14 23:10:01 +02:00
Eric Blake
a91e2a71d2 Use GPLv2+ plus exception as license for release.
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>
2008-04-05 17:04:48 -06:00
Ralf Wildenhues
50be220a2a * tests/autotest.at (Using atlocal): Quote instances of pwd.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008-03-25 07:35:29 +01:00
Eric Blake
21ba57f840 Improve error messages for common testsuite bugs.
* 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>
2008-03-11 18:58:33 -06:00
Eric Blake
f79a05503d Encode nested autotest data.
* 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>
2008-03-10 21:02:11 -06:00
Eric Blake
24093173fd Factor some autotest tests.
* 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>
2008-03-10 20:48:02 -06:00
Ralf Wildenhues
bac71a40b9 Ignore errors from ./run on w32.
* tests/autotest.at (whitespace in absolute testdir):
Ignore stderr for `./run' which fails to remove the
busy test directory on w32.
2008-03-02 11:24:46 +01:00
Ralf Wildenhues
c573f843cc Fix autotest --clean, and make it work with `-C dir'.
* 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.
2008-02-02 00:10:25 +01:00
Eric Blake
81e79b1cb4 Fix more autotest regressions.
* 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>
2008-01-29 16:56:36 -07:00
Eric Blake
66b8003184 More corner cases in testsuite VAR=VALUE handling.
* 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>
2008-01-29 10:24:12 -07:00