doc: update Vala documentation
[automake.git] / t / parallel-tests-suffix-prog.sh
blob7687aa43b0783567c2b26655e9ef03dc68a147d4
1 #! /bin/sh
2 # Copyright (C) 2009-2024 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 <https://www.gnu.org/licenses/>.
17 # Check parallel-tests features:
18 # - suffix rules, with PROGRAMS involved
19 # See also sister test 'parallel-tests-suffix.sh'.
21 required='cc native'
22 . test-init.sh
24 cat >> configure.ac << 'END'
25 AC_PROG_CC
26 AC_OUTPUT
27 END
29 cat > Makefile.am << 'END'
30 AUTOMAKE_OPTIONS = subdir-objects
31 ## Note that automake should not match the '/test' part of 'sub/test' as
32 ## '.test' suffix, nor the '/chk' part of 'sub/chk' as '.chk' suffix.
33 TESTS = $(dist_TESTS) $(check_PROGRAMS)
34 dist_TESTS = foo.chk bar.test sub/test
35 check_PROGRAMS = baz bla.test bli.suff sub/chk
36 TEST_EXTENSIONS = .chk .test
37 EXTRA_DIST = $(dist_TESTS)
38 END
40 mkdir sub
42 cat >foo.chk << 'END'
43 #! /bin/sh
44 exit 0
45 END
46 chmod a+x foo.chk
47 cp foo.chk bar.test
48 cp foo.chk sub/test
50 cat >baz.c << 'END'
51 int main (void)
53 return 0;
55 END
56 cp baz.c bla.c
57 cp baz.c bli.c
58 cp baz.c sub/chk.c
60 $ACLOCAL
61 $AUTOCONF
62 $AUTOMAKE -a
64 ./configure
65 $MAKE check
66 ls -l . sub
67 test -f foo.log
68 test -f bar.log
69 test -f baz.log
70 test -f bla.log
71 test -f bli.suff.log
72 test -f sub/chk.log
73 test -f sub/test.log
75 $MAKE distcheck