Hash :
6421a0c1
Author :
Date :
2010-05-08T03:04:09
Improve declaration of dependencies in the testsuite. * tests/Makefile.am (check_SCRIPTS): Remove. Instead, let ... ($(TEST_LOGS)): ... all test logs depend on the scripts. * test/gen-parallel-tests: For each parallel test foo-p.test, let `foo-p.log' also depend on `foo.test', since it is sourced. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
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 50 51 52
#! /bin/sh
# Generate parallel-tests.am.
#
# Copyright (C) 2009, 2010 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 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 "parallel_tests=yes" $tst >/dev/null \
|| grep "parallel_tests=['\"]yes" $tst >/dev/null
then :; else echo $tst; fi;
done |
sed -e 's/\.test$//' |
{
echo "## Generated by gen-parallel-tests. Edit Makefile.am instead of this."
echo "parallel_tests ="
# Since `foo-p.test' sources `foo.test', `foo-p.log' also depends on
# `foo.test'.
sed -e '
h
s/^/parallel_tests += /
s/$/-p.test/
p
x
s/.*/&-p.log: &.test/
'
}