Commit 61168e3c4c511e71ae8659388fe7ef8293222dbd

Stefano Lattarini 2012-01-06T12:39:24

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.