Merge branch master into maint after 1.12 release
[platform/upstream/automake.git] / t / test-driver-custom-no-extra-driver.sh
1 #! /bin/sh
2 # Copyright (C) 2011-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 that auxiliary script 'test-driver' doesn't get needlessly
18 # installed or referenced if it's not used, i.e., if the user has
19 # defined his own '*LOG_DRIVER' variables.
20
21 am_parallel_tests=yes
22 . ./defs || Exit 1
23
24 cat >> configure.ac <<'END'
25 AC_PROG_CC
26 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
27 AC_SUBST([X_LOG_DRIVER], [none])
28 AC_OUTPUT
29 END
30
31 mkdir sub1 sub2
32
33 cat > Makefile.am <<'END'
34 SUBDIRS = sub1 sub2
35 LOG_DRIVER =
36 TEST_LOG_DRIVER = :
37 TESTS = foo bar.test
38 END
39
40 cat > sub1/Makefile.am <<'END'
41 TEST_EXTENSIONS = .x .sh .pl
42 SH_LOG_DRIVER = dummy1
43 PL_LOG_DRIVER = dummy2
44 TESTS = a.pl b.sh c.x
45 END
46
47 cat > sub2/Makefile.am <<'END'
48 TEST_EXTENSIONS = .bar
49 LOG_DRIVER = x
50 BAR_LOG_DRIVER = y
51 TESTS = 1 2.bar 3.test 4.t 5.tt $(check_PROGRAMS)
52 check_PROGRAMS = p1 p2$(EXEEXT) p3.bar p4.suf
53 END
54
55 $ACLOCAL
56
57 for opts in '' '--add-missing' '-a -c'; do
58   $AUTOMAKE $opts
59   $FGREP test-driver Makefile.in sub[12]/Makefile.in && Exit 1
60   find . | $FGREP test-driver && Exit 1
61   : For shells with busted 'set -e'.
62 done
63
64 :