2 # Copyright (C) 2011-2012 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)
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 regression of parallel-tests:
18 # - 'test-driver' script not correctly distributed when TESTS is
19 # defined in a subdir Makefile
21 am_create_testdir=empty
24 ocwd=`pwd` || fatal_ "getting current working directory"
28 whereopts=$1 auxdir=$2
30 2,ac) ac_opts=parallel-tests am_code= ;;
31 2,am) am_opts=parallel-tests ac_code= ;;
32 *) fatal_ "do_check: bad usage";;
37 unindent > configure.ac << END
39 AC_CONFIG_AUX_DIR([$auxdir])
40 AM_INIT_AUTOMAKE([$ac_opts])
41 AC_CONFIG_FILES([Makefile tests/Makefile])
44 if test $auxdir = .; then
45 test_driver=test-driver
48 test_driver=$auxdir/test-driver
50 # No 'AUTOMAKE_OPTIONS' in here -- purposely.
51 unindent > Makefile.am << END
55 ls -l \$(distdir) \$(distdir)/* ;: For debugging.
56 test -f \$(distdir)/$test_driver
59 unindent > tests/Makefile.am << END
60 AUTOMAKE_OPTIONS = $am_opts
63 echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
65 EXTRA_DIST = \$(TESTS)
67 unindent > tests/foo.test << 'END'
71 chmod a+x tests/foo.test
81 # Try code path without automatic installation of required files.
82 mv -f Makefile.in Makefile.sav
83 mv -f tests/Makefile.in tests/Makefile.sav
85 diff Makefile.in Makefile.sav
86 diff tests/Makefile.in tests/Makefile.sav