tests: fix a timestamp-related spurious failures
[automake.git] / tests / parallel-tests4.test
blobefe7e8d10999480e78918618a8f747b576917610
1 #! /bin/sh
2 # Copyright (C) 2009, 2010 Free Software Foundation, Inc.
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.
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.
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/>.
17 # Check parallel-tests features:
18 # - suffix rules
20 parallel_tests=yes
21 . ./defs || Exit 1
22 set -e
24 cat >> configure.in << 'END'
25 AC_PROG_CC
26 AC_OUTPUT
27 END
29 cat > Makefile.am << 'END'
30 ## Note that automake should not match the '/test' part
31 ## of 'sub/test' as '.test' suffix.
32 TESTS = foo.chk bar.test $(check_PROGRAMS) sub/test
33 check_PROGRAMS = baz bla.test bli.suff
34 TEST_EXTENSIONS = .chk .test
35 END
37 mkdir sub
39 cat >foo.chk << 'END'
40 #! /bin/sh
41 exit 0
42 END
43 chmod a+x foo.chk
44 cp foo.chk bar.test
45 cp foo.chk sub/test
47 cat >baz.c << 'END'
48 int main (void)
50 return 0;
52 END
53 cp baz.c bla.c
54 cp baz.c bli.c
56 $ACLOCAL
57 $AUTOCONF
58 $AUTOMAKE -a
60 ./configure
61 $MAKE
62 $MAKE check
63 test -f foo.log
64 test -f bar.log
65 test -f baz.log
66 test -f bla.log
67 test -f bli.suff.log
68 test -f sub/test.log