Commit Graph

60 Commits

Author SHA1 Message Date
Akim Demaille
f9c9bd2420 * tests/atgeneral.m4 (AT_INIT): Register at-setup-line and
at-check-line for removal.
Check for the presence of at-check-line only when $at_test was
really a test.
Reported by Pavel.
2001-03-05 15:58:31 +00:00
Pavel Roskin
42e1d2db7b * tests/atgeneral.m4 (AT_INIT): s/am_me/as_me/. Quote AT_CHECK
in the error message.
2001-03-04 08:08:55 +00:00
Akim Demaille
de7bee7a82 * tests/atgeneral.m4 (AT_INIT): Warn when at-check-line is
missing.
* tests/tools.at (Syntax of the scripts): Use AT_CHECK to test
/bin/sh -n.  Exit 77 on failure.
Reported by Harlan Stenn.
2001-02-28 09:33:30 +00:00
Akim Demaille
b8d698ca1d The recent addition of `exit's prototype in confdefs.h causes
AC_OUTPUT_MAKE_DEFS to include junky -D switches.
Reported by Wolfgang Mueller.
* tests/torture.at (#define header templates): Include trash in
confdefs.h.
* tests/atgeneral.at (AT_INIT): Don't expect `find' to support
-maxdepth, hence don't use -follow either.
Reported by Nicolas Joly.
* acgeneral.m4 (AC_OUTPUT_MAKE_DEFS) <confdef2opt.sed>: In the
`quote' section, `p'rint the result.
If neither `#define' pattern match, just call `d' to start a new
cycle.
Call this sed program with -n.
2001-01-30 19:29:38 +00:00
Akim Demaille
77a10dfe9d * tests/compile.at: New test.
* tests/atspecific.at (AT_CHECK): When given 77 as expected exit
status, don't include the `skip' mechanism.
2001-01-30 18:45:58 +00:00
Akim Demaille
471039146b * tests/atgeneral.m4: Don't redirect builtins' stderr as Ultrix
hates this: use a subshell.
2001-01-29 15:30:11 +00:00
Akim Demaille
1304fbbe0b * tests/atgeneral.m4 (AT_INIT): Include a default case for non
existing tests.
* tests/atspecific.m4 (AT_CONFIGURE_AC, AT_CHECK_ENV)
(AT_CHECK_AUTOUPDATE, AT_CHECK_AU_MACRO): New.
Spread their use.
(AT_CHECK_MACRO): Pass `-W obsolete' to autoconf.
* tests/semantics.at (AC_HAVE_FUNCS): Obsolete, don't check.
* tests/mktest.sh: Create one test file per Autoconf source
file instead of separating syntax/update.
2001-01-22 09:03:38 +00:00
Akim Demaille
a606e651c9 * sh.m4 (AS_ESCAPE): New.
(_AS_QUOTE_IFELSE): Use it.
* tests/atgeneral.m4 (AT_INIT) <SHELL>: Define and use.
<--help> Don't display the options help when tests were selected.
Document -d.
<at_skip_list>: New.
<testsuite.log>: Give a banner, include ChangeLog snippets, list
the failed and skipped tests.
Remove useless $at_traceoff in sub shells, this improves the
readability of the traces by removing testsuite's implementation
details.
(AT_CHECK): Filter out the shell traces from the tested command's
stderr.
Use AS_ESCAPE.
Don't register experr and expout for clean up, as it's hairy and
easier to do from...
Support STDOUT = stdout, and STDERR = stderr.
Force the output of shell traces.
(AT_INIT): Here.
2001-01-22 08:59:02 +00:00
Akim Demaille
8448b8f911 * tests/atgeneral.m4 (AT_data_files): Fix the computation of PATH. 2001-01-16 13:48:55 +00:00
Akim Demaille
e2e36c55ce * Makefile.am (editpl, editsh): Merge into...
(edit).
* m4sh.m4 (AS_UNAME): Eved out from...
* acgeneral.m4 (_AC_INIT_DEFAULTS): here.
(_AC_INIT_PACKAGE): Define AC_PACKAGE_NAME.
(_AC_INIT_PARSE_ARGS): AC_SUBST the PACKAGE_ variables.
Propagate their use in the executables and the test suite.
* tests/atgeneral.m4 (PATH): Include only absolute paths.
(AT_INIT): Use AS_UNAME.
2001-01-16 10:25:57 +00:00
Akim Demaille
05ee2bf953 * tests/atgeneral.m4 (AT_INIT): Simplify the hairy display of the
identity of the tests.
2001-01-15 07:38:35 +00:00
Akim Demaille
b508b51fb8 * tests/atgeneral.m4 (AT_INIT): When the suite failed, complain
before creating the debug scripts.
Create a log file.
When ignoring a test, display a reassuring `ok' for stressed
users, and say `skipped' instead.
Simply run `testsuite' with the failed tests instead of running
the debug scripts, this avoids having zillions of banners `Testing
Blabla 2.13' (another means to avoid these banners is to have the
test suite succeed :-).
2001-01-15 07:35:36 +00:00
Akim Demaille
bd16bfa0e3 * sh.m4 (AS_BOX, _AS_BOX_LITERAL, _AS_BOX_INDIR): New.
* tests/atgeneral.m4: Use it.
2001-01-15 07:29:48 +00:00
Akim Demaille
59ecd7666a * acgeneral.m4 (AC_VAR_INDIR_IFELSE): Move as...
* m4sh.m4 (AS_LITERAL_IF): this.
(AS_IFELSE): Rename as...
(AS_IF): this.
2001-01-15 07:29:24 +00:00
Akim Demaille
55953c9b14 With expr's that return 0' on failures, the executable suffix is
`0'.  Test and fix.
Reported by Assar Westerlund.

* Makefile.am (maintainer-check): New target.
* tests/Makefile.am (maintainer-check, maintainer-check-posix)
(maintainer-check-c++, expr): Likewise.
* configure.in (EXPR): Look for it.
* tests/atgeneral.m4 (AT_CHECK): Propagate $2's default value.
* tests/compile.at (Extensions): New test.
* aclang.m4 (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O):
Distinguish files with or without a dot.
2001-01-12 09:39:26 +00:00
Akim Demaille
be42075f17 * tests/atgeneral.m4 (AT_CLEANUP_FILE_IFELSE): Fix the regexp: the
pattern ` state* ' was added many times for `*' was improperly
escaped.
(AT_INIT): Remove the data files before running the tests.
Define AT_data_files and output it.
(AT_SETUP): Don't.
(_m4_divert(TEST)): Remove, now useless.
2000-12-20 09:15:59 +00:00
Akim Demaille
6804b0e12a * tests/atgeneral.m4 (AT_CHECK): Make exit status report more
visible.
* tests/atspecific.m4 (AT_CHECK_AUTOCONF): Support FLAGS, STDOUT
and STDERR.
(AT_CHECK_CONFIGURE): Support plenty, cleanup defs when needed.
Spread their use in the whole suite.
Simplify a few AT_CLEANUPs.
2000-12-19 08:15:48 +00:00
Akim Demaille
7fd0f6597d * tests/atgeneral.m4 (AT_CHECK): Accept if-failed and
if-not-failed.
* tests/atspecific.m4 (AT_CHECK_CONFIGURE): Use it in order to
dump config.log when configure failed.  Before, the log was
reported only on success.
2000-12-19 08:15:20 +00:00
Akim Demaille
ce736ccd6e * tests/atgeneral.m4 (AT_BANNER, AT_CLEANUP): Formatting changes. 2000-12-19 08:09:38 +00:00
Akim Demaille
112b68ac15 * tests/atgeneral.m4 (AT_INIT): Forget about `-n'.
Adjust so that `./testsuite -h 1 2' explains only tests 1 & 2.
2000-12-15 07:47:45 +00:00
Pavel Roskin
27853939be * m4sugar.m4 (m4_file_append): Add a newline after _m4eof,
otherwise _m4eof is appended to the output on FreeBSD 4.0.
* tests/atgeneral.m4 (AT_INIT): Avoid using unbalanced "y"
in sed, use "s" instead.
* tests/mktests.sh: Don't use ? in sed - it's a GNU extension.
Use separate patterns for A[CU]_DEFUN and AC_DEFUN_ONCE.
2000-12-13 14:53:51 +00:00
Akim Demaille
1e5ec2a947 * tests/atgeneral.m4 (AT_INIT): More robust computation of
ac_tests_pattern.
Reported by  Andrej Borsenkow.
2000-12-07 16:21:58 +00:00
Akim Demaille
5561d67cf9 * tests/atgeneral.m4 (AT_CHECK): Bad typo: assign `exit 1' to
at_continue if something failed, not `:'.
* tests/semantics.at (AC_PATH_XTRA): New.
* acspecific.m4 (_AC_PATH_X): New, extracted form AC_PATH_X.
2000-12-07 15:21:54 +00:00
Akim Demaille
5e7468d665 Stop playing with FDs in Autotest.
* tests/atgeneral.m4 (AT_INIT): Set up FD 5.
(AT_CHECK): Instead of using exec to globally change the FDs of
`testsuite', enclose the body of the test into a
`(..) >stdout 2>stderr'.
In every case, when verbose, display the differences between
expected and oberved (stdout, stderr, exit status).
Let `0' be the default for EXIT-STATUS.
Support EXIT-STATUS == `ignore'.
2000-12-06 16:29:50 +00:00
Akim Demaille
9bae9af007 * tests/atgeneral.m4 (AT_CHECK): Fix the m4_ifval invocation. 2000-12-06 08:59:21 +00:00
Akim Demaille
482e84f65c * m4sugar.m4 (ifelse): Rename as...
(m4_if): this.
* autoconf.m4 (ifelse): Restore.
2000-12-06 08:58:41 +00:00
Pavel Roskin
93c61512d9 * tests/atgeneral.m4 (AT_INIT): Use ${CONFIG_SHELL-/bin/sh}
to run the testsuite from the debug scripts.
Suggested by Alexandre Oliva.
2000-12-02 00:46:57 +00:00
Akim Demaille
a8c122d0f2 Provide a means to display banners in the test suite.
* tests/atgeneral.m4 (AT_INIT): Initialize AT_banner_ordinal.
Execute the epilogue of the tests only if a test was run.
Don't built the value of `at_tests_all' by a for loop: expand
AT_TESTS_ALL.
(AT_SETUP): Build AT_TESTS_ALL.
(AT_BANNER): New.
Adjust all the former banners to use it.
(AT_CHECK): Don't trace the decoding of $?.
2000-11-29 10:12:05 +00:00
Akim Demaille
acbcc5f2b7 * tests/atgeneral.m4 (AT_DEFINE, AT_UNDEFINE, AT_SHIFT)
(AT_INCLUDE): Remove, use the m4_ macros.
2000-11-29 10:11:38 +00:00
Akim Demaille
d1961284af * tests/atconfig.in: Move code into...
* tests/atgeneral.m4 (AT_INIT): here.
Use AS_SHELL_SANITIZE.
2000-11-23 09:54:16 +00:00
Akim Demaille
0c0b7ab5a6 Have the test suite list of the test groups and their references.
* tests/atgeneral.m4 (_m4_divert(SUITE_PRO)): Remove, replaced
by...
(_m4_divert(DEFAULT), _m4_divert(OPTIONS), _m4_divert(HELP))
(_m4_divert(SETUP)): these.
(_m4_divert(SUITE_EPI)): Rename as...
(_m4_divert(TAIL)): this.
(AT_INIT): Adjust to the new diversions.
Insert the magic number.
Accept test groups as cli argument.
List the test groups.
Rename TESTS, test, and tests as at_tests_all, at_test, and
at_tests.
Have the debug scripts pass options to test suite.
Remove their banner.
* tests/atspecific.m4: Don't divert to 0.
* suite.at: Don't insert the magic number.
2000-11-23 09:53:52 +00:00
Akim Demaille
2fc75f4ce5 * m4sugar.m4 (m4_divert, m4_undivert): Support named diversions.
* tests/atgeneral.m4 (_m4_divert(SUITE_PRO), _m4_divert(TESTS))
(_m4_divert(SUITE_EPI), _m4_divert(TEST)): New diversions.
Push the first two diversions.
(AT_INIT): Don't.
(AT_INIT, AT_SETUP, AT_CLEANUP): Adjust to use the named
diversions.
2000-11-23 09:53:26 +00:00
Akim Demaille
7a7e444ed7 * tests/atgeneral.m4 (AT_CLEANUP): Factor the computation of
at_test_count into...
(AT_INIT): here.
Use an sh variable, at_data_files, instead of an hard coded list.
2000-11-23 09:52:58 +00:00
Akim Demaille
0280c4a535 * tests/atgeneral.m4 (AT_CLEAN_FILE_IFELSE, AT_CLEANUP_FILE)
(AT_CLEANUP_FILES): New	macros.
(AT_SETUP, AT_CHECK, AT_CLEANUP): Use them.
(AT_CHECK): Fix a use of at_verbose.
* tests/atspecific.m4 (AT_CHECK_AUTOCONF, AT_CHECK_AUTOHEADER)
(AT_CHECK_CONFIGURE): New macros.
2000-11-23 09:52:35 +00:00
Akim Demaille
755bc2706a * tests/atgeneral.m4 (AT_INIT) <at_verbose>: Be a :/echo variable.
<at_silent>: Remove.
(AT_CLEANUP): Clean up the diversion use.
2000-11-23 09:52:08 +00:00
Akim Demaille
e490f231b9 Factor part of the prologue of the tests.
* tests/atgeneral.m4 (AT_SETUP, AT_CLEANUP): No longer handle
at_stop_on_error.
(AT_INIT): After having checked whether the test failed, break out
of the loop if requested (-e).
2000-11-23 09:51:33 +00:00
Akim Demaille
f102e1f133 * tests/atgeneral.m4 (AT_SETUP): Don't build at-check-line, that's
AT_CHECK's job.
Remove the code depending upon `at_skip_mode': it's unused.
2000-11-23 09:50:51 +00:00
Akim Demaille
1a74eafcf1 * tests/atconfig.in: Remove the `snippet' marks, there are no
longer used.
* tests/atgeneral.m4: Likewise.
2000-11-23 09:49:57 +00:00
Akim Demaille
ae13937d34 Factor the epilogue of the tests.
* tests/atgeneral.m4 (AT_CLEANUP): Move the reading of at_status
into...
(AT_INIT): here, at the end of the `case'.
2000-11-23 09:49:08 +00:00
Akim Demaille
bca7b71cf8 The debug scripts are only wrapper around testsuite, asking for a
specific test.
* tests/atgeneral.m4 (AC_INIT) <at_debug>: New variable, new
option, -d, to disable the creation of the debug scripts (when
testsuite was already launched from one).
<at_test_count>: Really compute it instead of using the number of
the last test run.
2000-11-23 09:48:28 +00:00
Akim Demaille
ce8108c250 Transform Autotest's body into a `for test; case $test'.
As a known side effect, currently any code outside
AT_SETUP/AT_CLEANUP is discarded.
* acgeneral.m4 (_m4_divert(KILL)): Move to...
* m4sugar.m4: here.
* tests/atgeneral.m4 (AT_INIT): Use m4_divert_push/pop instead of
m4_divert.
Put all the tests inside a for;case.
Define TESTS.
(AT_SETUP, AT_CLEANUP): Open/close each case.
2000-11-23 09:47:45 +00:00
Akim Demaille
be1c95cd56 Move divert and undivert into m4_.
* m4sugar.m4 (m4_divert, divert, undivert): Rename as...
(m4_divert_text, m4_divert, m4_undivert): this.
* autoconf.m4 (divert, undivert): Restore them for user macros only.
2000-11-23 09:46:48 +00:00
Akim Demaille
a9e30cc83a Move Autotest on top of M4sh.
* tests/atgeneral.m4: Import M4sh.
Adjust the differences on the names of the builtins (define etc.).
(AT_CASE): Remove, use m4_case.
(AT_SETUP): Don't use `AT_group_description', `$1' is OK.
* tests/atspecific.m4 (m4_for, m4_foreach): Remove, use those of
M4sugar.
* tests/m4sugar.at: Strengthen the quotation and adjust to the new
macro names.
* tests/m4sh.at: Ditto.
* tests/torture.at: Ditto.
* tests/base.at: Ditto.
* m4sh.m4: Import M4sugar.
* autoconf.m4: Don't import M4sugar, M4sh does.
2000-11-23 09:45:48 +00:00
Pavel Roskin
1d03fe1675 * acgeneral.m4 (_AC_COMPUTE_INT_COMPILE): Use ":" instead of
"true".
        * tests/atgeneral.m4 (AT_INIT): Likewise.
        * tests/tools.at (Syntax of the scripts): Likewise.
2000-11-09 18:59:18 +00:00
Akim Demaille
e015643d3f * tests/atgeneral.m4 (AT_CHECK): Check stderr first, since if both
stdout and stderr fail, differences on the latter are probably
more significant than on the former.
2000-11-02 15:21:04 +00:00
Akim Demaille
f2a537cc26 * tests/atgeneral.m4 (AT_CHECK, AT_CLEANUP): Be more verbose when
`-v' is passed.
2000-11-02 12:23:42 +00:00
Pavel Roskin
03bbc0e52b * tests/atgeneral.m4 (AT_CHECK): Warn if the expected exit status
is different from what we got. Don't preserve exit status other
        than 77.
2000-10-30 03:24:44 +00:00
Akim Demaille
c27236bff5 * tests/atgeneral.m4 (AT_INIT): Avoid foo="bar", foo=bar is
enough.
Use grep to check the presence of a string in a stream.
* m4/atconfig.m4: Quote.
2000-10-18 12:42:20 +00:00
Pavel Roskin
32f853c7e3 * tests/atgeneral.m4 (AT_CHECK): Make sure that $? is set to 0
if diffs have succeded.
2000-10-11 19:59:43 +00:00
Akim Demaille
af51198638 * src/atgeneral.m4 (AC_CHECK): Display stderr including when the
test failed because of stdout.
2000-09-21 13:06:03 +00:00