Hash :
c33683f0
Author :
Date :
2009-03-08T14:04:38
parallel-tests: Ensure backward-compatible semantics. For each test in Automake's test suite that uses TESTS, generate an identical one that uses the `parallel-tests' option, for coverage of backward-compatible functionality. * tests/gen-parallel-tests: New file, generates distributed Makefile.am snippet tests/parallel-tests.am to list all tests that use the TESTS interface but not yet the `parallel-tests' option, with names mangled to use suffix `-p.test', in ... (parallel_tests): ... this new make macro. * tests/Makefile.am ($(srcdir)/parallel-tests.am) ($(parallel_tests), defs-p): New rules. (TESTS): Add check11.test and $(parallel_tests). (check_SCRIPTS): Add defs-p, $(parallel_tests). (check-clean-local): Remove `defs-p'. (EXTRA_DIST): Distribute gen-parallel-tests. (MAINTAINERCLEANFILES): New variable, remove $(parallel_tests). * bootstrap: Generate parallel-tests.am. * tests/check8.test: Check for circular dependencies in rules. * tests/check11.test: New test, check that SKIPs are not counted as passed tests. * tests/defs.in: Unset DISABLE_HARD_ERRORS, LAZY_TEST_SUITE, VERBOSE, so the tests are not influenced by the way our test suite is invoked. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
#! /bin/sh
# Generate parallel-tests.am.
#
# For each test in the TESTS list in this Makefile.am file, that itself
# tests features of the TESTS automake interface, generate a sibling
# test that does likewise, but with the option `parallel-tests' enabled.
set -e
tests=`sed -n '/^TESTS =/,/^$/s/\(.*\.test\).*/\1/p' Makefile.am`
{
grep -l '^TESTS ' $tests
grep -l ' TESTS ' $tests
} |
grep -v '.-p\.test' |
LC_ALL=C sort -u |
while read tst; do
if grep '^[^#]*parallel-tests' $tst >/dev/null \
|| grep '^\. \./defs-p' $tst >/dev/null
then :; else echo $tst; fi;
done |
{
echo "## Generated by gen-parallel-tests. Edit Makefile.am instead of this."
echo "parallel_tests = \\"
sed 's,\.test$,-p.test,; $!s,$, \\,'
}