]> git.ipfire.org Git - thirdparty/automake.git/commit
tests: skip tests on perl TAP driver if TAP::Parser is not available
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 6 Jan 2012 11:39:24 +0000 (12:39 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 6 Jan 2012 17:36:11 +0000 (18:36 +0100)
commit61168e3c4c511e71ae8659388fe7ef8293222dbd
tree656af25647e7ff4629e285240d071e197df05382
parentdacb456ac6435c15c1ee230533129e05f7ab06bf
tests: skip tests on perl TAP driver if TAP::Parser is not available

We had so far taken for granted that all the perl installations
modern enough to correctly run automake also came with a built-in
TAP::Parser module; unfortunately, testing on MinGW/MSYS has
shown that this is not always true, and that a lot of spurious
testsuite failures would take place in such a situation (see
automake bug#10440).

Luckily, the perl implementation of the Automake TAP driver is
only meant to be used for prototyping and consistency checks, the
"real" Automake TAP driver being the portable one implemented in
awk.  So we can simply skip the affected tests on systems lacking
TAP::Parser.

* tests/defs (fetch_tap_driver): Skip the whole test case if
the desired tap driver implementation is the perl one but the
TAP::Parser module is unavailable.
* tests/tap-bad-prog.tap: Adjust order of calls to `plan_' and
`fetch_tap_driver', to ensure the test is not skipped after the
TAP plan has been outputted (which would lead to a spurious
error).
* tests/tap-bad-signal.tap: Tweak to avoid the need to source the
`tap-setup.sh' script, as that might cause a test skip too late,
i.e., after a TAP plan has been already printed.
* tests/tap-test-number-0.test: Do not force the test to skip
when the tested TAP driver implementation is not the perl one.
On the other hand, when it *is* the perl one, skip the test if
the TAP::Parser module is unavailable.
* tests/test-driver-cond.test: Skip the part of the test actually
running "make check" if the TAP::Parser module is unavailable.
* tests/get-sysconf.test: Also print the version of the
`TAP::Parser' module, if available.

Reported by Peter Rosin.
tests/defs
tests/get-sysconf.test
tests/tap-bad-prog.tap
tests/tap-signal.tap
tests/tap-test-number-0.test
tests/test-driver-cond.test