tests: rename 'tests/' => 't/', '*.test' => '*.sh'
[platform/upstream/automake.git] / t / parallel-tests-suffix.sh
1 #! /bin/sh
2 # Copyright (C) 2009-2012 Free Software Foundation, Inc.
3 #
4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 2, or (at your option)
7 # any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
16
17 # Check parallel-tests features:
18 # - suffix rules
19 # See also sister test 'parallel-tests-suffix-prog.test'.
20
21 am_parallel_tests=yes
22 . ./defs || Exit 1
23
24 cat >> configure.ac << 'END'
25 AC_OUTPUT
26 END
27
28 cat > Makefile.am << 'END'
29 ## Note that automake should not match the '/test' part
30 ## of 'sub/test' as '.test' suffix.
31 TESTS = foo.chk bar.test baz bli.suff sub/test
32 TEST_EXTENSIONS = .chk .test
33 EXTRA_DIST = $(TESTS)
34 END
35
36 mkdir sub
37
38 cat >foo.chk << 'END'
39 #! /bin/sh
40 exit 0
41 END
42 chmod a+x foo.chk
43 cp foo.chk bar.test
44 cp foo.chk baz
45 cp foo.chk bli.suff
46 cp foo.chk sub/test
47
48 $ACLOCAL
49 $AUTOCONF
50 $AUTOMAKE -a
51
52 ./configure
53 $MAKE check
54 ls -l . sub
55 test -f foo.log
56 test -f bar.log
57 test -f baz.log
58 test -f bli.suff.log
59 test -f sub/test.log
60
61 $MAKE distcheck
62
63 :