Hash :
8192eeb5
Author :
Date :
2010-05-08T01:27:36
Modernize, improve and/or fix various test scripts. * tests/sanity.test: Rely on the `configure.in' stub created by `./defs', rather than writing one from scratch. * tests/depend2.test: Likewise. Also, call `set -e' just after the inclusion of `./defs', instead that later in the script. * tests/canon5.test: Avoid a useless `|| Exit 1' after a call to $AUTOMAKE, and improve the positioning of an $ACLOCAL call. * tests/exeext4.test: Use $FGREP instead of grep, where possible. Make auxiliary rules in the generated Makefile more silent. These changes make some checks slighty stricter. * tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails. * tests/gettext2.test: Place final `:' at the end of the script, rather than in the middle. * tests/exeext.test: Call `set -e' just after the inclusion of `./defs', instead that later in the script. * tests/extra5.test: Likewise. * tests/confdeps.test: Likewise. Also, prefer `mv -f' over plain `mv', just to be sure. * tests/depcomp.test: Enable `errexit' shell flag, with related changes. Also, modernize the generated configure.in. * tests/cond9.test: Likewise. Also, rely on the `configure.in' stub created by `./defs', rather than writing one from scratch. * tests/cond10.test: Likewise. * tests/depcomp2.test: Likewise. * tests/depend3.test: Likewise. * tests/distcom7.test: Likewise. * tests/fortdep.test: Likewise. Also, remove definition of AUTOMAKE_OPTIONS to `foreign' in the generated Makefile.am, since that flag is already provided by $AUTOMAKE. * tests/mdate.test: Made stricter, by checking that Automake actually failed, and by making a stricter grep on the error message. Also, set shell `errexit flag'. * tests/python2.test: Improved verbose messages. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
#! /bin/sh
# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure that Automake suggests using AM_PATH_PYTHON.
. ./defs || Exit 1
set -e
echo 1. pythondir not defined
cat > Makefile.am <<'END'
PYTHON = x
python_PYTHON = foo.py
END
$ACLOCAL
AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
echo 2. pkgpythondir not defined
cat > Makefile.am <<'END'
PYTHON = x
pkgpython_PYTHON = foo.py
END
$ACLOCAL
AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
echo 3. pyexecdir not defined
cat > Makefile.am <<'END'
PYTHON = x
pyexec_PYTHON = foo.py
END
$ACLOCAL
AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
echo 4. pkgpyexecdir not defined
cat > Makefile.am <<'END'
PYTHON = x
pkgpyexec_PYTHON = foo.py
END
$ACLOCAL
AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
echo 5. PYTHON not defined.
cat > Makefile.am <<'END'
pkgpyexecdir = /here/we/go
pkgpyexec_PYTHON = foo.py
END
$ACLOCAL
AUTOMAKE_fails -a
grep AM_PATH_PYTHON stderr
echo 6. Ok.
cat > Makefile.am <<'END'
PYTHON = x
pkgpyexecdir = /here/we/go
pkgpyexec_PYTHON = foo.py
END
$ACLOCAL
$AUTOMAKE -a
test -f py-compile
echo 7. Ok again.
cat > Makefile.am <<'END'
PYTHON = x
fubardir = /here/we/go
fubar_PYTHON = foo.py
END
$ACLOCAL
$AUTOMAKE -a