test: protect more yacc declarations against C vs. C++ linkage.
[automake.git] / t / test-driver-custom-no-extra-driver.sh
blob33f3b6b93de604596ccb9aa6ea0d54c86faea289
1 #! /bin/sh
2 # Copyright (C) 2011-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 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.
21 . test-init.sh
23 cat >> configure.ac <<'END'
24 AC_PROG_CC
25 AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
26 AC_SUBST([X_LOG_DRIVER], [none])
27 AC_OUTPUT
28 END
30 mkdir sub1 sub2
32 cat > Makefile.am <<'END'
33 SUBDIRS = sub1 sub2
34 LOG_DRIVER =
35 TEST_LOG_DRIVER = :
36 TESTS = foo bar.test
37 END
39 cat > sub1/Makefile.am <<'END'
40 TEST_EXTENSIONS = .x .sh .pl
41 SH_LOG_DRIVER = dummy1
42 PL_LOG_DRIVER = dummy2
43 TESTS = a.pl b.sh c.x
44 END
46 cat > sub2/Makefile.am <<'END'
47 TEST_EXTENSIONS = .bar
48 LOG_DRIVER = x
49 BAR_LOG_DRIVER = y
50 TESTS = 1 2.bar 3.test 4.t 5.tt $(check_PROGRAMS)
51 check_PROGRAMS = p1 p2$(EXEEXT) p3.bar p4.suf
52 END
54 $ACLOCAL
56 for opts in '' '--add-missing' '-a -c'; do
57 $AUTOMAKE $opts
58 $FGREP test-driver Makefile.in sub[12]/Makefile.in && exit 1
59 find . | $FGREP test-driver && exit 1
60 : For shells with busted 'set -e'.
61 done