tests: avoid a spurious failure on MSYS
[platform/upstream/automake.git] / t / parallel-tests-suffix.sh
1 #! /bin/sh
2 # Copyright (C) 2009-2013 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.sh'.
20
21 . test-init.sh
22
23 cat >> configure.ac << 'END'
24 AC_OUTPUT
25 END
26
27 cat > Makefile.am << 'END'
28 ## Note that automake should not match the '/test' part
29 ## of 'sub/test' as '.test' suffix.
30 TESTS = foo.chk bar.test baz bli.suff sub/test
31 TEST_EXTENSIONS = .chk .test
32 EXTRA_DIST = $(TESTS)
33 END
34
35 mkdir sub
36
37 cat >foo.chk << 'END'
38 #! /bin/sh
39 exit 0
40 END
41 chmod a+x foo.chk
42 cp foo.chk bar.test
43 cp foo.chk baz
44 cp foo.chk bli.suff
45 cp foo.chk sub/test
46
47 $ACLOCAL
48 $AUTOCONF
49 $AUTOMAKE -a
50
51 ./configure
52 $MAKE check
53 ls -l . sub
54 test -f foo.log
55 test -f bar.log
56 test -f baz.log
57 test -f bli.suff.log
58 test -f sub/test.log
59
60 $MAKE distcheck
61
62 :