tests: remove recipes that run tests with 'prove'
[platform/upstream/automake.git] / t / parallel-tests8.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 # - generated distributed tests.
19 # - listing $(srcdir)/ or $(top_srcdir)/ in TESTS doesn't work ATM,
20 #   and is thus diagnosed.
21
22 # TODO: this test should also ensure that the 'make' implementation
23 #       properly adheres to rules in all cases.  See the Autoconf
24 #       manual for the ugliness in this area, when VPATH comes into
25 #       play.  :-/
26
27 am_parallel_tests=yes
28 . ./defs || Exit 1
29
30 cat >> configure.ac << 'END'
31 AC_OUTPUT
32 END
33
34 cat > Makefile.am << 'END'
35 TESTS = foo.test
36 ## the next line will cause automake to error out:
37 TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
38 .in.test:
39 ## Account for VPATH issues on weaker make implementations (e.g. IRIX 6.5)
40         cp `test -f '$<' || echo $(srcdir)/`$< $@
41         chmod +x $@
42 check_SCRIPTS = $(TESTS)
43 EXTRA_DIST = foo.in foo.test
44 DISTCLEANFILES = foo.test
45 END
46
47 cat > foo.in <<'END'
48 #! /bin/sh
49 echo "this is $0"
50 exit 0
51 END
52
53 $ACLOCAL
54 $AUTOCONF
55 AUTOMAKE_fails -a
56 grep '$(srcdir).*TESTS.*bar\.test' stderr
57 grep '$(top_srcdir).*TESTS.*baz\.test' stderr
58
59 sed '/^TESTS +=.*srcdir/d' < Makefile.am > t
60 mv -f t Makefile.am
61 $AUTOMAKE -a
62
63 ./configure
64 $MAKE check
65 $MAKE distcheck
66 $MAKE distclean
67
68 mkdir build
69 cd build
70 ../configure
71 $MAKE check
72 test ! -f ../foo.log
73 $MAKE distcheck
74
75 :