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'.
+2011-08-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ 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'.
+
2011-08-08 Stefano Lattarini <stefano.lattarini@gmail.com>
test defs: fix bug in TAP version of `skip_all_'
# line breaking in the use of AC_OUTPUT. Synthesised by a bunch
# of older tests (referenced below).
-planned=22
. ./defs || Exit 1
+plan_ 22
+
rm -f configure.in depcomp # Not required.
# -----------------------------------------------------------------------
# the files) it's supposed to, and that these files are symlinked by
# default, but copied if the `--copy' option is used.
-planned=unknown # Counting it would be too much data-dependent.
. ./defs || Exit 1
build_aux=build-aux
# Test Automake's command-line options.
-planned=17
. ./defs || Exit 1
+plan_ 17
+
# Usage: bad_cmdline DESCRIPTION REGEX-FOR-STDERR [ARGS-FOR-AUTOMAKE...]
do_check ()
{
## required by them. ##
## ----------------------------------------------------------- ##
-# The TAP plan must be either the fist or last line of output.
-if test $using_tap = yes && test ${planned-unknown} != unknown; then
- plan_ "$planned"
-fi
-
# Print it here, so that the user will see it also if the test
# will be skipped due to some tool missing in $PATH itself.
echo "$PATH"
# which caused make to die with an error like:
# "sub/.deps/subfoo.Po:3: *** missing separator. Stop."
+required=cc
+. ./defs || Exit 99
+
# Per each valid depmode three kinds of VPATH, and per each of them
# a test on "./configure" and one on "make & remake"; so there are
# 17 * 3 * 2 = 102.
-planned=102
-required=cc
-. ./defs || Exit 99
+plan_ 102
ocwd=`pwd` || fatal_ "cannot get current working directory"
# Original report from James Amundson about file names with spaces.
# Other characters added by Paul Eggert.
-planned=94 # Two tests per "problematic string".
. ./defs || Exit 99
+plan_ 94 # Two tests per "problematic string".
+
# Usage: is_in_list ITEM [LIST...]
is_in_list ()
{
# - missing, unreadable, or not-executable test scripts cause proper
# error reports
-planned=5
parallel_tests=yes
. ./defs || Exit 1
+plan_ 5
+
cp "$top_testsrcdir"/lib/tap-driver . \
|| fatal_ "failed to fetch auxiliary script tap-driver"