tests/ac-output-old.tap


Log

Author Commit Date CI Message
Stefano Lattarini 5b44ce39 2012-02-23T13:07:57 tests: quote 'like this', not `like this', as per GCS recommendation This patch converts the automake testsuite and related files, to the use of new quoting format 'like this' or "like this" rather than `like this'. This is done for consistency with the new recommendations in the GNU Coding Standards, and, well, because I've come to actually prefer the '...' and "..." quoting formats over the `...' one. * tests/README: Update quoting format throughout. Remove some "excessive" use of quoting, and throw in minor rewording where appropriate. * tests/Makefile.am: Likewise, for comments. * tests/CheckListOfTests.am: Likewise. * tests/defs-static.in: Likewise. * tests/defs: Likewise. * tests/trivial-test-driver: Likewise. * Many tests/*.tap, tests/*.test and tests/*.sh files: Likewise, and for the diagnostic and informational messages as well. * tests/gen-testsuite-part: Likewise, and for the generated tests as well.
Stefano Lattarini db973eaa 2012-02-21T19:47:36 tests: prefer 'configure.ac' over 'configure.in' With this change, our testsuite now uses 'configure.ac' as the name for the typical autoconf input, instead of the obsolescent 'configure.in' (which has been deprecated for several years, at least since autoconf 2.50). Most of the test cases changed by this commit have been automatically modified with this sed command (using GNU sed): sed -i 's/\<configure\(\\\?\)\.in\>/configure\1.ac/g' * syntax-checks.mk (sc_tests_no_configure_in): New syntax check. (syntax_check_rules): Add it. * tests/defs: Create stub for autoconf input in 'configure.ac', not in 'configure.in'. Adjust comments. ($AUTOCONF, $AUTOHEADER, $AUTORECONF): Remove workaround for the infamous debian autoconf wrapper: we don't need such workaround anymore now that we name our autoconf input as 'configure.ac'. For more information, see commit v1.11-564-g63da492 "test defs: hack to support autoconf-wrapper programs" of 16-12-2011. * tests/README: Use 'configure.ac', not 'configure.in'. * Many many tests: Likewise. * tests/backcompat3.test: Adjust to avoid spurious failures. * tests/backcompat5.test: Likewise. * tests/missing6.test: Likewise. * tests/backcompat6.test: Likewise, and extend a bit since we are at it.
Stefano Lattarini 641a5a4b 2012-02-16T10:46:23 maint: run "make update-copyright"
Stefano Lattarini e61b581a 2011-08-09T22:30:26 testsuite: improvements to our shell TAP library and APIs These improvements impact only the Automake's own testsuite. * tests/tap-functions.sh (plan_): Allow new special arguments "unknown" a.k.a. "later" and "lazy" a.k.a. "now". Perform sanity check the given arguments. Adjust incorrect comments. (lazy_plan_): Removed, superseded by the new version of `plan_'. (not): New function, run a command and inverts its exit status. (ok_, not_ok_, skip_): These are just shorthands for common `result_' usages. (xfail_, xpass_, reset_test_count_): Removed, they are not used, nor does a legitimate use for them seem in sight. (not): New function, to run a command inverting its exit status. (command_not_ok_): Removed, superseded by `command_ok_' + `not'. (command_ok_): Extended to accept TAP directives. * tests/defs (trap): Don't use `late_plan_' anymore, use `plan_ "now"' instead. * tests/ac-output-old.tap: Update to take advantage of the new APIs. * tests/self-check-env-sanitize.tap: Likewise. * tests/suffix-chain.tap: Likewise. * tests/suffix10.tap: Likewise. * tests/suffix11.tap: Likewise. * tests/suffix3.tap: Likewise. * tests/suffix8.tap: Likewise. * tests/tap-bad-prog.tap: Likewise. * tests/self-check-exit.tap: Likewise, plus a small improvement in the name of a variable.
Stefano Lattarini 8be644b8 2011-08-08T15:43:53 testsuite: improve interface for giving early TAP plan Since commit `v1.11-976-g4740f56', an early TAP plan can also be specified after input lines have already been seen, as long as no one of them is a TAP result line. We can now take advantage of this in our own testsuite, allowing the TAP-based scripts to specify their earlier plan after having included `./defs'. In particular, this offers the benefit of allowing those scripts to issue a "skip all" plan (e.g., "1..0 # SKIP reason ...") after the inclusion of `./defs', which wasn't possible with the older interface (introduced in commit `v1.11-1114-g0286308'). * tests/defs: Don't try to call `plan_' if `$planned' is defined, the calling scripts can do that directly now. * tests/ac-output-old.tap: Use `plan_' directly instead of setting `$planned' before including `./defs'. * tests/automake-cmdline.tap: Likewise. * tests/depmod.tap: Likewise. * tests/instspc.tap: Likewise. * tests/tap-bad-prog.tap: Likewise. * tests/add-missing.tap: Don't set `$planned'.
Stefano Lattarini 0286308c 2011-08-07T09:42:48 testsuite: TAP tests can have early plan now * tests/defs: When using TAP, allow the user to specify the number of tests through the `$planned' variable. (trap): Do not print the auto-generated plan if an explicit one has already been printed. * tests/defs-static.in: Complain and bail out if the `$planned' variable is exported in the environment. Reformat the code to facilitate future additions. * tests/Makefile.am (TESTS_ENVIRONMENT): Neutralize `$planned'. * tests/self-check-env-sanitize.test: Update. * tests/ac-output-old.tap: Give an explicit TAP plan, by defining `$planned' just before including `./defs'. * tests/depmode.tap: Likewise. * tests/automake-cmdline.tap: Likewise. * tests/tap-bad-prog.tap: Likewise. * tests/instspc.tap: Likewise, and related adjustments. * tests/add-missing.tap: Make it explicit that we have no a-priori plan, and tell why.
Stefano Lattarini c349db06 2011-07-17T13:38:42 testsuite: scaffolding to allow use of TAP in our own tests Now that Automake has initial support for the TAP test protocol, we can start "eating our own dog food" and rewrite some tests to use TAP; this should allow for better granularity, especially in the control of skips and expected failures. With this change, we set up the initial scaffolding required by the planned TAP tests, and convert few older tests to use TAP, mostly in order to verify that there are no obvious errors. The tests in our testsuite that use the TAP protocol will be marked by the new `.tap' extension. * tests/plain-functions.sh: New file containing definition of helper shell functions used by the "protocol-less" tests of the Automake testsuite. * tests/tap-functions.sh: New file containing definition of helper shell functions used by the TAP-producing tests of the Automake testsuite. * tests/defs: Remove definitions of some functions that are now defined in `plain-functions.sh'. Instead, source one of `plain-functions.sh' or `tap-functions.sh', depending on whether `$use_tap' is set to "no" or "yes". (exit trap): Call `late_plan_' if `$use_tap' is true. Also, unset shell traces before issuing the latest commands, to avoid confusing the tap driver with spurious output. * tests/defs-static.in ($use_tap): New variable, by default set to "yes" if the calling test script has a `.tap' suffix, and to "no" otherwise. The individual scripts can override it though. In code sanity-checking the environment, verify that `$use_tap' is not exported. * tests/self-check-env-sanitize.test: Update, and small related reformatting. * tests/self-check-tap.test: New very minimal self test. * tests/acoutbs.test, tests/acoutbs2.test, tests/acoutnoq.test, tests/acoutpt.test, tests/acoutpt2.test, tests/acoutqnl.test: Removed, merged into ... * tests/ac-output-old.tap: ... this new test, that uses TAP. * tests/Makefile.am (TAP_LOG_DRIVER): Define to invoke our own `tap-driver' script. (TAP_LOG_DRIVER_FLAGS): Define to `--merge', so that the stdout and stderr of the test scripts remains synced. (TEST_EXTENSIONS): Define, to add the `.tap' suffix; also list the `.test' suffix explicitly. (EXTRA_DIST): Distribute the new files `plain-functions.sh' and `tap-functions.sh'. ($(TEST_LOGS)): Depends on them. (AM_TESTS_ENVIRONMENT): Ensure that `use_tap' is not exported in the environment of the tests. (TESTS): Update.