* 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>
* lib/autotest/general.m4 (AT_INIT) <PARSE_ARGS_END>: Detect
leading = as invalid. Defer use of command-line variable
assignments...
<PREPARE_TESTS>: ...here, after atconfig has been sourced. Fix
regression in sourcing files.
* tests/autotest.at (Using atlocal): New test to catch this.
(Debugging a successful test, Choosing where testsuite is run):
Use correct shell.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (_AT_ARG_OPTION): Move missing argument
detection...
(AT_INIT) <PARSE_ARGS_END>: ...here, since -k always takes
argument.
<DEFAULTS>: Delay computation of variables based on $at_dir...
<PREPARE_TESTS>: ...to here, since -C can change $at_dir.
<TESTS>: Re-invoke via absolute name, since -C may be in effect.
<PARSE_ARGS>: Parse new option.
<HELP_TUNING>: Document it.
* tests/autotest.at (Choosing where testsuite is run): New test
for this feature.
(Keywords and ranges): Add test for missing -k argument.
* NEWS: Document this.
* doc/autoconf.texi (testsuite Invocation): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (srcdir propagation): Copy install-sh to
source tree.
(my only test): Drop setting of `top_srcdir'.
* tests/base.at (Input/Output): Likewise.
* tests/local.at (AT_CONFIGURE_AC): Copy install-sh,
config.guess, and config.sub to test source tree.
Drop AC_CONFIG_AUX_DIR setting.
(AT_CHECK_CONFIGURE): Drop setting of `top_srcdir'.
* tests/torture.at (Substitute a 2000-byte string): Drop
AC_CONFIG_AUX_DIR setting, copy install-sh to test source tree.
(Substitute a newline, datarootdir workaround): Likewise.
(Define a newline): Adjust for linenumber changes in configure.ac.
* tests/foreign.at (Libtool): Adjust comment to reflect changes.
(AT_INIT): Pre-extract test groups into separate files.
(AT_CLEANUP): Source pre-extracted file instead of calling at_func_test.
Remove at-test-source files together with the $at_group_dir.
* tests/autotest.at (Long test source lines): New test.
* lib/autotest/general.m4 (Defaults): Validate input ranges ...
<at_func_validate_ranges>: ... using this new function.
* tests/autotest.at (Keywords and ranges): Test invalid ranges.
Test --list with ranges and keywords.
(Banners): Remove one now-failing test.
* lib/autotest/general.m4 (BANNERS): New named diversion.
(TESTS_END): Diversion no longer used.
(AT_INIT) <at_func_banner, BANNERS>: Factor all banners into a
shell function, which prints only as needed, using an associative
array of banner text from a special diversion.
<PARSE_ARGS_END>: No longer need awk to find banners.
<TESTS>: Banners are no longer processed by main driver loop, so
we no longer need case statement.
(AT_BANNER): Rewrite to populate new diversion.
(AT_SETUP): Each test invokes its own banner. No output is needed
to the TESTS diversion.
* doc/autoconf.texi (Writing Testsuites): Document slight
semantics change.
* tests/autotest.at (AT_BANNERS): Enhance test.
* NEWS: Document AT_BANNER.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_append_uniq): Warn if separator
occurs in string, as duplicates may be added.
(_m4_append_uniq): New helper macro.
(m4_append_uniq_w): New macro.
* lib/autotest/general.m4 (AT_TESTED, AT_KEYWORDS): Fix
duplication bug by using new macro.
(AT_INIT) <at_tested>: Restore newline separators. Invoke tested
programs with stdin redirected, so programs that don't
understand --version won't try to behave interactively.
* tests/autotest.at (Tested programs): Catch this bug.
* tests/m4sugar.at (m4@&t@_append): Test new macro.
* tests/local.at (AT_TESTED): Add m4, perl.
* doc/autoconf.texi (Text processing Macros): Document
m4_append_uniq_w, and update text on m4_append.
* NEWS: Document the addition.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <at_func_test>: Merely
extract the source test source, do not invoke it.
(AT_SETUP, AT_CLEANUP): Source test code outside shell function.
* tests/autotest.at (Fallacy): Actually let the inner suite fail,
expect exit status of 1.
* tests/autotest.at (Skip): New test, for bogus zsh exit status.
* lib/m4sugar/m4sugar.m4 (m4_expand): New macro.
* lib/autotest/general.m4 (AT_SETUP): Use it to preserve
whitespace after single-quoted comma.
* tests/autotest.at (AT_CHECK_AT_TITLE_CHAR): Test this.
* NEWS: Revert caveat about semantics change on comma.
* doc/autoconf.texi (Programming in M4): Lighten the warning on
using m4sugar; it is stabilizing.
(Redefined M4 Macros): Touch up wording on M4 builtins.
(Evaluation Macros): Document m4_expand.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_max, m4_min): New macros.
(m4_sign): Sort.
(m4_text_wrap): Fix off-by-one error in rewrite from m4_for to
m4_format.
* lib/autotest/general.m4 (AT_SETUP): Avoid negative width.
* tests/autotest.at (Long test title, Longer test title): Test
this fix, beyond what AS_HELP_STRING already tests.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_SETUP): Only expand description
once; thereafter, use its expansion, properly quoted.
* tests/autotest.at (AT_CHECK_AT_TITLE): Also check macro
expansion with arguments, and check for aligned output.
(AT_CHECK_AT_TITLE_CHAR): Remove XFAILs for tests that now pass.
Add a test for macros with parameters.
* NEWS: Document the semantics change.
* tests/base.at: Fix test titles containing commas.
* tests/compile.at: Likewise.
* tests/tools.at: Likewise.
* tests/torture.at: Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (AT_CHECK_AT_TITLE): Properly quote the
font-lock fix.
* tests/torture.at (@%:@define header templates): Rename, so that
output lines up correctly.
Signed-off-by: Eric Blake <ebb9@byu.net>
(BS-BS-newline in command, BSx640-newline in command):
(Newline-CODE-BS-newline in command):
(Single-quote-BS-newline in command):
(Single-quote-newline-BS-newline in command):
Use printf '%s\n' instead of echo, for portability to hosts
where echo interprets backslashes. This will break on hosts
that lack printf, but for now let's assume all such hosts
are dead (if not, we should get reports of test failures).
* lib/autotest/general.m4 (AT_INIT): M4-quote and AS_ESCAPE AT_help_all
properly.
(AT_SETUP): M4-quote and AS_ESCAPE the title properly everywhere.
* tests/autotest.at (AT_CHECK_AT_TITLE): Add EXPANDED-TITLE-TO-TEST
argument. Extend to check titles printed by ./micro-suite and
./micro-suite -l and the title in micro-suite.log.
(Backquote in a test title,
Single-quote in a test title,
Double-quote in a test title): Don't expect failure anymore.
(Backslash in a test title): Put a non-whitespace character after the
backslash so that Bourne shells might actually see it as an escape
sequence.
(Brackets in a test title,
Pound in a test title,
Comma in a test title,
Quoted Macro in a test title,
Macro in a test title,
Macro with single-quote in a test title): New tests.
(Macro with backquote in a test title,
Macro with double-quote in a test title,
Macro with backslash in a test title): New tests expected to fail.
* tests/torture.at (#define header templates): M4-quote this title in
AT_SETUP call so that no M4 code is commented inadvertently somewhere.
The visible effect was a stray [] in the testsuite output.
assignments in `at_debug_args', so that we put them correctly
in the `run' script.
* tests/autotest.at (Debugging a failed test): Unmark XFAIL.
Reported by Eric Blake.
top-level tests after micro-suite has been run. Used in...
(Debugging a successful test, Debugging script and environment),
(Debugging a failed test): ...these new tests. The first of these
is fixed by...
* lib/autotest/general.m4 (_AT_CREATE_DEBUGGING_SCRIPT): New
macro, split out from...
(AT_INIT): ...here, so that using -d also generates a run script.
Document that -d inhibits top-level logging.
* doc/autoconf.texi (testsuite Invocation): Document that -d only
inhibits top-level logging; debug scripts are created.
(Multiline backquote command substitution): Remove mistaken
AT_NO_CMDSUBST from the 2006-03-14 patch, which was meant to be
applied...
(Parenthetical command substitution, Multiline parenthetical
command substitution): here.