2 # Generate parallel-tests.am.
4 # Copyright (C) 2009, 2010 Free Software Foundation, Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2, or (at your option)
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 # For each test in the TESTS list in this Makefile.am file, that itself
20 # tests features of the TESTS automake interface, generate a sibling
21 # test that does likewise, but with the option `parallel-tests' enabled.
25 tests=`sed -n '/^TESTS =/,/^$/s/\(.*\.test\).*/\1/p' Makefile.am`
27 grep -l '^TESTS ' $tests
28 grep -l ' TESTS ' $tests
33 if grep '^[^#]*parallel-tests' $tst >/dev/null \
34 || grep "parallel_tests=yes" $tst >/dev/null \
35 || grep "parallel_tests=['\"]yes" $tst >/dev/null
36 then :; else echo $tst; fi;
39 echo "## Generated by gen-parallel-tests. Edit Makefile.am instead of this."
40 echo "parallel_tests = \\"
41 sed 's,\.test$,-p.test,; $!s,$, \\,'