Hash :
9d9f00ed
Author :
Date :
2012-01-15T21:07:44
tests: move list of tests in its own Makefile fragment This change will make it easier to merge maint into master, which has a similar Makefile setup in the testsuite. * tests/Makefile.am (include): Inclusion of ... * tests/list-of-tests.mk: ... this new file. * tests/Makefile.am (TESTS): Move most of its content into, and redefine in function of, ... * tests/list-of-tests.mk (handwritten_TESTS): ... this new variable. * tests/gen-parallel-tests: Update.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
#! /bin/sh
# Generate parallel-tests.am.
#
# Copyright (C) 2009, 2010, 2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# For each automake test case that checks features of the TESTS automake
# interface, generate a sibling test that does likewise, but with the
# option `parallel-tests' enabled. Individual tests can prevent the
# creation of such a sibling by explicitly setting the `$parallel_tests'
# variable to either "yes" or "no". The rationale for this is that if
# the variable is set to "yes", the test already uses the `parallel-tests'
# option, so that a sibling would be just a duplicate; while if the
# variable is set to "no", the test doesn't support, or is not meant to
# run with, the `parallel-tests' option, and forcing it to do so in the
# sibling would likely cause a spurious failure.
set -e
tests=`sed -n '/^handwritten_TESTS *=/,$p' <list-of-tests.mk \
| sed -n 's/\(.*\.test\).*/\1/p'`
{
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 "parallel_tests=" $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,$, \\,'
}