[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1658
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1658-g5dee15f |
Date: |
Sat, 31 Dec 2011 19:20:24 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=5dee15f4684717914cbfbbc2db5fe22e8f5e25e2
The branch, master has been updated
via 5dee15f4684717914cbfbbc2db5fe22e8f5e25e2 (commit)
via a07d169a9a0b416ee1637863a02df3f8f807c514 (commit)
from 47b0a251e64d467cd30b0d3d2210f7a456851c9b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 5dee15f4684717914cbfbbc2db5fe22e8f5e25e2
Author: Stefano Lattarini <address@hidden>
Date: Sat Dec 31 20:14:38 2011 +0100
maintcheck: fix a couple of typos in error messages
* Makefile.am (sc_tests_plain_autoheader): Fix the message to
report a bad use of "autocheader", not of "automake."
(sc_tests_plain_autom4te): Likewise, but for "autom4te" instead.
(sc_tests_plain_autoreconf): Likewise, but for "autoreconf"
instead.
commit a07d169a9a0b416ee1637863a02df3f8f807c514
Author: Stefano Lattarini <address@hidden>
Date: Sat Dec 31 19:57:21 2011 +0100
maintcheck: be sure to look at all the test cases
Many maintainer checks in the top-level Makefile.am did some
unwarranted assumptions about the test cases, i.e., they assumed
that all the test scripts matched the wildcard `$(srcdir)/*.test'.
This failed to properly take into account VPATH builds (where some
generated tests might be in ${builddir} rather than in ${srcdir}),
TAP-based tests script (which have a `.tap' extension) and helper
scripts used by other test cases (which have a `.sh' extension).
Fixes automake bug#9299.
* Makefile.am (xtests): New variable, containing a (dynamically
computed) of files that looks like test cases of the automake
testsuite.
Update many rules to use this new variable instead of blindly
assuming that all the testcases matches the $(srcdir)/tests/*.test
wildcard.
* tests/tap-bad-prog.tap: Do a minor formatting change to
avoid spuriously triggering a match from the syntax check
`sc_tests_overriding_macros_on_cmdline'.
-----------------------------------------------------------------------
Summary of changes:
Makefile.am | 84 +++++++++++++++++++++++++++++------------------
tests/tap-bad-prog.tap | 6 +++-
2 files changed, 57 insertions(+), 33 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index f3638dd..77d76eb 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -207,6 +207,22 @@ clean-local: clean-coverage
.PHONY: check-coverage recheck-coverage check-coverage-run \
recheck-coverage-run check-coverage-report clean-coverage
+# We also have to take into account VPATH builds (where some generated
+# tests might be in `$(builddir)' rather than in `$(srcdir)'), TAP-based
+# tests script (which have a `.tap' extension) and helper scripts used
+# by other test cases (which have a `.sh' extension).
+xtests = \
+ `if test $(srcdir) = .; then \
+ dirs=.; \
+ else \
+ dirs='$(srcdir) .'; \
+ fi; \
+ for d in $$dirs; do \
+ for s in test tap sh; do \
+ ls $$d/tests/*.$$s 2>/dev/null; \
+ done; \
+ done | sort`
+
# Some simple checks, and then ordinary check. These are only really
# guaranteed to work on my machine.
syntax_check_rules = \
@@ -330,7 +346,10 @@ m4_builtins = \
sc_test_names:
@m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
- if ls tests/*.test | LC_ALL=C grep -E "$$m4_macro_rx"; then \
+ if { \
+ for t in $(xtests); do echo $$t; done \
+ | LC_ALL=C grep -E "$$m4_macro_rx"; \
+ }; then \
echo "the names of the tests above can be problematic" 1>&2; \
echo "Avoid test names that contain names of m4 macros" 1>&2; \
exit 1; \
@@ -369,8 +388,9 @@ sc_no_brace_variable_expansions:
## Make sure `rm' is called with `-f'.
sc_rm_minus_f:
- @if grep -v '^#' $(srcdir)/lib/am/[a-z]*.am $(srcdir)/tests/*.test | \
- grep -E '\<rm ([^-]|\-[^f ]*\>)'; then \
+ @if grep -v '^#' $(srcdir)/lib/am/[a-z]*.am $(xtests) \
+ | grep -E '\<rm ([^-]|\-[^f ]*\>)'; \
+ then \
echo "Suspicious 'rm' invocation." 1>&2; \
exit 1; \
else :; fi
@@ -489,10 +509,7 @@ sc_tests_obsolete_variables:
seen=""; \
for v in $$vars; do \
if grep -E "\b$$v\b" \
- $(srcdir)/tests/*.test \
- $(srcdir)/tests/*.tap \
- $(srcdir)/tests/*.sh \
- $(srcdir)/tests/defs \
+ $(xtests) $(srcdir)/tests/defs \
$(srcdir)/tests/defs-static.in \
; then \
seen="$$seen $$v"; \
@@ -507,57 +524,57 @@ sc_tests_obsolete_variables:
## Tests should never call make directly.
sc_tests_plain_make:
- @if grep -v '^#' $(srcdir)/tests/*.test | $(EGREP) ':[ ]*make( |$$)';
then \
+ @if grep -v '^#' $(xtests) | $(EGREP) ':[ ]*make( |$$)'; then \
echo 'Do not run "make" in the above tests. Use "$$MAKE" instead.'
1>&2; \
exit 1; \
fi
## Tests should never call autoconf directly.
sc_tests_plain_autoconf:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autoconf\>';
then \
+ @if grep -v '^#' $(xtests) | grep ':[ ]*autoconf\>'; then \
echo 'Do not run "autoconf" in the above tests. Use "$$AUTOCONF"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call autoupdate directly.
sc_tests_plain_autoupdate:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoupdate\>'; then \
+ @if grep -v '^#' $(xtests) | grep ':[ ]*autoupdate\>'; then \
echo 'Do not run "autoupdate" in the above tests. Use "$$AUTOUPDATE"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call automake directly.
sc_tests_plain_automake:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[
]*automake\>([^:]|$$)'; then \
+ @if grep -v '^#' $(xtests) | grep -E ':[ ]*automake\>([^:]|$$)';
then \
echo 'Do not run "automake" in the above tests. Use "$$AUTOMAKE"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call autoheader directly.
sc_tests_plain_autoheader:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoheader\>'; then \
- echo 'Do not run "automake" in the above tests. Use "$$AUTOHEADER"
instead.' 1>&2; \
+ @if grep -v '^#' $(xtests) | grep ':[ ]*autoheader\>'; then \
+ echo 'Do not run "autoheader" in the above tests. Use "$$AUTOHEADER"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call autoreconf directly.
sc_tests_plain_autoreconf:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[
]*autoreconf\>'; then \
- echo 'Do not run "automake" in the above tests. Use "$$AUTORECONF"
instead.' 1>&2; \
+ @if grep -v '^#' $(xtests) | grep ':[ ]*autoreconf\>'; then \
+ echo 'Do not run "autoreconf" in the above tests. Use "$$AUTORECONF"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call autom4te directly.
sc_tests_plain_autom4te:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*autom4te\>';
then \
- echo 'Do not run "automake" in the above tests. Use "$$AUTOM4TE"
instead.' 1>&2; \
+ @if grep -v '^#' $(xtests) | grep ':[ ]*autom4te\>'; then \
+ echo 'Do not run "autom4te" in the above tests. Use "$$AUTOM4TE"
instead.' 1>&2; \
exit 1; \
fi
## Tests should only use END and EOF for here documents
## (so that the next test is effective).
sc_tests_here_document_format:
- @if grep '<<' $(srcdir)/tests/*.test | grep -v 'END' | grep -v 'EOF';
then \
+ @if grep '<<' $(xtests) | grep -v 'END' | grep -v 'EOF'; then \
echo 'Use here documents with "END" and "EOF" only, for
greppability.' 1>&2; \
exit 1; \
fi
@@ -566,8 +583,8 @@ sc_tests_here_document_format:
## This is so that the exit status is transported correctly across the 0 trap.
## Ignore comments, testsuite self tests, and one perl line in ext2.test.
sc_tests_Exit_not_exit:
- @found=false; for file in $(srcdir)/tests/*.test; do \
- case $$file in */self-check-*.test) continue;; esac; \
+ @found=false; for file in $(xtests); do \
+ case $$file in */self-check-*) continue;; esac; \
res=`sed -n -e '/^#/d; /^\$$PERL/d' -e '/<<.*END/,/^END/b' \
-e '/<<.*EOF/,/^EOF/b' -e '/exit [$$0-9]/p' $$file`; \
if test -n "$$res"; then \
@@ -582,28 +599,28 @@ sc_tests_Exit_not_exit:
## Use AUTOMAKE_fails when appropriate
sc_tests_automake_fails:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep
'\$$AUTOMAKE.*&&.*[eE]xit'; then \
+ @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
echo 'Use AUTOMAKE_fails + grep to catch automake failures in the
above tests.' 1>&2; \
exit 1; \
fi
## Tests should never call aclocal directly.
sc_tests_plain_aclocal:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*aclocal\>';
then \
+ @if grep -v '^#' $(xtests) | grep ':[ ]*aclocal\>'; then \
echo 'Do not run "aclocal" in the above tests. Use "$$ACLOCAL"
instead.' 1>&2; \
exit 1; \
fi
## Tests should never call perl directly.
sc_tests_plain_perl:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*perl\>'; then
\
+ @if grep -v '^#' $(xtests) | grep ':[ ]*perl\>'; then \
echo 'Do not run "perl" in the above tests. Use "$$PERL" instead.'
1>&2; \
exit 1; \
fi
## Setting `required' after sourcing `./defs' is a bug.
sc_tests_required_after_defs:
- @for file in $(srcdir)/tests/*.test; do \
+ @for file in $(xtests); do \
if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out";
then \
echo 'Do not set "required" after sourcing "defs" in '"$$file:
$$out" 1>&2; \
exit 1; \
@@ -642,7 +659,7 @@ sc_tests_tap_plan:
## DISTCHECK_CONFIGURE_FLAGS and DISABLE_HARD_ERRORS are exceptions, too,
## as package authors are urged not to initialize them anywhere.
sc_tests_overriding_macros_on_cmdline:
- @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(srcdir)/tests/*.test;
then \
+ @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(xtests); then \
echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e
SHELL=$$SHELL"' 1>&2; \
echo ' in the above lines, it is more portable.' 1>&2; \
exit 1; \
@@ -656,12 +673,12 @@ sc_tests_overriding_macros_on_cmdline:
-e "s/ DISTCHECK_CONFIGURE_FLAGS='[^']*'/ /" \
-e 's/ DISTCHECK_CONFIGURE_FLAGS="[^"]*"/ /' \
-e 's/ DISTCHECK_CONFIGURE_FLAGS=[^ ]/ /' \
- $(srcdir)/tests/*.test | grep '\$$MAKE .*='; then \
+ $(xtests) | grep '\$$MAKE .*='; then \
echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above
lines,' 1>&2; \
echo 'it is more portable.' 1>&2; \
exit 1; \
fi
- @if grep 'SHELL=.*\$$MAKE' $(srcdir)/tests/*.test; then \
+ @if grep 'SHELL=.*\$$MAKE' $(xtests); then \
echo '$$MAKE ignores the SHELL envvar, use "$$MAKE SHELL=$$SHELL" in'
1>&2; \
echo 'the above lines.' 1>&2; \
exit 1; \
@@ -671,14 +688,14 @@ sc_tests_overriding_macros_on_cmdline:
## Use `$sleep' instead. Some filesystems (e.g., Windows') have only
## a 2sec resolution.
sc_tests_plain_sleep:
- @if grep -E '\bsleep +[12345]\b' $(srcdir)/tests/*.test; then \
+ @if grep -E '\bsleep +[12345]\b' $(xtests); then \
echo 'Do not use "sleep x" in the above tests. Use "$$sleep"
instead.' 1>&2; \
exit 1; \
fi
## fgrep and egrep are not required by POSIX.
sc_tests_plain_egrep_fgrep:
- @if grep -E '\b[ef]grep\b' $(srcdir)/tests/*.test ; then \
+ @if grep -E '\b[ef]grep\b' $(xtests) ; then \
echo 'Do not use egrep or fgrep in test cases. Use $$FGREP or
$$EGREP.' 1>&2; \
exit 1; \
fi
@@ -726,14 +743,17 @@ sc_tests_makefile_variable_order:
sc_ensure_testsuite_has_run
## Using `:' as a PATH separator is not portable.
sc_tests_PATH_SEPARATOR:
- @if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
+ @if grep -E '\bPATH=.*:.*' $(xtests) ; then \
echo "Use \`\$$PATH_SEPARATOR', not \`:', in PATH definitions above."
1>&2; \
exit 1; \
fi
sc_mkdir_p:
- @if grep 'mkdir_p' $(srcdir)/automake.in \
- $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
+ @if grep 'mkdir_p' \
+ $(srcdir)/automake.in \
+ $(srcdir)/lib/am/*.am \
+ $(xtests); \
+ then \
echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
exit 1; \
fi
diff --git a/tests/tap-bad-prog.tap b/tests/tap-bad-prog.tap
index 900c531..a59a1dc 100755
--- a/tests/tap-bad-prog.tap
+++ b/tests/tap-bad-prog.tap
@@ -50,7 +50,11 @@ $AUTOMAKE
./configure
-if $MAKE check >stdout; then r='not ok'; else r='ok'; fi
+if $MAKE check >stdout; then
+ r='not ok'
+else
+ r='ok'
+fi
cat stdout
result_ "$r" '"make check" returns non-zero exit status'
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1658-g5dee15f,
Stefano Lattarini <=