Hash :
31bbce9e
Author :
Date :
2011-08-19T13:07:29
testsuite: various fixlets and tweakings * tests/seenc.test: Make grepping of automake stderr stricter. Add a trailing `:' command. * tests/symlink.test: Likewise. Also, define `$am_create_testdir' to "empty" to avoid bringing in unused auxiliary files (only to have to remove them right away), and use proper m4 quoting in `configure.in'. * tests/vpath.test: Make grepping of generated `Makefile.in' slightly stricter. Prefer trailing `:' over trailing `Exit 0'. * tests/suffix6c.test: Unset OBJEXT to avoid interferences from the environment. * tests/suffix12.test: Do not whitespace-indent `##' comments when they are embedded in a makefile rule: having them indented is not part of the Automake API, and might cause failures with e.g., Tru64 make. * tests/syntax.test: Simplify the `Makefile.am' to ensure that automake doesn't fail for the wrong reasons. Make grepping of automake stderr slightly stricter. * tests/test-harness-vpath-rewrite.test: Remove useless variable definition from `Makefile.am'. * tests/test-driver-custom-multitest.test: Fix typo in comments. * tests/self-check-me.tap: Fix minor typo in test description. * tests/vars3.test: Make grepping of automake stderr stricter and safer. * tests/version6.test: Add sanity check, verifying that the version number extracted from `automake --version' output seems legit. * tests/auxdir2.test: Renamed ... * tests/auxdir-compauted.tap: ... to this, and converted to the use of TAP. * tests/auxdir4.test: Renamed ... * tests/auxdir-unportable.tap: ... to this, and converted to the use of TAP. * tests/auxdir3.test: Renamed ... * tests/auxdir-misplaced.test: ... to this. * tests/auxdir5.test: Renamed ... * tests/auxdir-nonexistent.test: ... to this. * tests/auxdir9.test: Renamed ... * tests/auxdir-autodetect.test: ... to this. * tests/Makefile.am (TESTS): Update. (XFAIL_TESTS): Remove `auxdir2.test'.
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
#! /bin/sh
# Copyright (C) 2002, 2010, 2011 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/>.
# Check that Automake warns about variables containing spaces
# and other non-POSIX characters.
. ./defs || Exit 1
cat >Makefile.am <<'EOF'
L01 = $(shell echo *)
L02 = $$(not an error)
L03 = $$(this is)$${ok too}
L04 = $(nextvariableisbad)$(addsuffix .a, $(A))
L05 = "$(bad boy)"
L06 = $(this:is= ok)
L07 = ${three errors}${on this} $(long line)
L08$(o u c h): $(wildcard *.c)
${another Error}
echo $${ok-this is}
L11: $(thisis) $(ok)
${here}
EOF
$ACLOCAL
# Make sure this warning is print in the `portability' category.
$AUTOMAKE --warnings=no-error,none,portability 2>stderr \
|| { cat stderr >&2; Exit 1; }
cat stderr >&2
# Lines number are printed in error message.
# Use them to make sure errors are diagnosed against the right lines.
# No error expected apart from those on these lines.
grep -v '^Makefile\.am:[145789]:' stderr | grep . && Exit 1
# Now check some individual values.
grep ':1:.*shell echo' stderr
grep 'nextvariableisbad' stderr && Exit 1
grep ':4:.*addsuffix' stderr
grep ':5:.*bad boy' stderr
grep ':7:.*three errors' stderr
grep ':7:.*on this' stderr
grep ':7:.*long line' stderr
grep ':8:.*o u c h' stderr
grep ':8:.*wildcard' stderr
grep ':9:.*another Error' stderr
$EGREP 'ok|thisis|here' stderr && Exit 1
# None of these errors be diagnosed with `-Wno-portability'.
$AUTOMAKE -Wno-portability
# Likewise if we add this in the Makefile.am
# (although this makes some difference internally: AUTOMAKE_OPTIONS is
# processed far later).
echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
$AUTOMAKE
: