[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-1474-g3305854 |
Date: |
Fri, 07 Oct 2011 12:10:46 +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=33058547a381c93ee594a6b5b9cf53c74f650060
The branch, testsuite-work has been updated
via 33058547a381c93ee594a6b5b9cf53c74f650060 (commit)
via a3d1cdbc30755257b4a0f001c4cc8e6acaba72d1 (commit)
via 64aebd615605c46e9b969aab0e6fbfb58863cb81 (commit)
via ba0c477b275aaae0e4f77003ac96f4cc2ec12ebf (commit)
via 8356631ecc5304ea01308f92967ece2d10e1bfa2 (commit)
via 473ea1d1ef00f0f2c537a2e54d5257b2639f3d35 (commit)
via 80795e05596fa50c395979bf0238d69709297f71 (commit)
via 30eb17ff6ebb7d3c3904f7f65ded96a9568dbcd7 (commit)
via d710255c09afd2d6e06d72259816988a0a79ea18 (commit)
via b9b79d887abdc615bae92a9dd79de881664d19d3 (commit)
via 49088d88d626fc63317e0e4dd9d56138336da7c1 (commit)
via 7d40532a3464eee6a26d303c378c44af95075698 (commit)
via 39a9fd16381469f911d42a3e27975edcb248bbf2 (commit)
via 736fde9f6cf8d514ef30dc5d83fe2a41c3e22c9a (commit)
via 0773a99888c8932c19b61145d78317278d2bdd66 (commit)
via 1cfe9542265d1d2a36d7cd90751b2ed269b0fbd3 (commit)
via edbf3610ce57e51a07a3191cb4d436cdc0c3d4a2 (commit)
from fc78d517bfd36cff9af5ce8b5f16ad44e94559a3 (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 33058547a381c93ee594a6b5b9cf53c74f650060
Merge: 8356631 a3d1cdb
Author: Stefano Lattarini <address@hidden>
Date: Fri Oct 7 13:19:16 2011 +0200
Merge branch 'test-protocols' into testsuite-work
commit 8356631ecc5304ea01308f92967ece2d10e1bfa2
Merge: edbf361 473ea1d
Author: Stefano Lattarini <address@hidden>
Date: Thu Oct 6 22:14:15 2011 +0200
Merge branch 'test-protocols' into testsuite-work
* test-protocols:
fix: improve latest ChangeLog entry after merge
parallel-tests: don't allow @substitutions@ in TEST_EXTENSIONS
tests: fix spurious error in 'test-extensions.test'
tests: fix spurious failure in 'insthook.test'
maintcheck: fix spurious failure
regenerate Makefile.in
commit edbf3610ce57e51a07a3191cb4d436cdc0c3d4a2
Author: Stefano Lattarini <address@hidden>
Date: Thu Oct 6 15:00:37 2011 +0200
tests: avoid few useless uses of the `-e' make option
* tests/python12.test: Using `make -e' is not required to override
the DESTDIR variable, since this variable shouldn't be defined in
any automake-generated Makefile.in file.
* tests/man2.test: Likewise.
* tests/man5.test: Likewise.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 64 ++++++++++++++++++++
Makefile.in | 2 +-
NEWS | 11 ++--
automake.in | 35 +++++++++--
lib/am/distdir.am | 4 +-
tests/Makefile.in | 1 +
tests/insthook.test | 6 ++-
tests/list-of-tests.mk | 1 +
tests/man2.test | 4 +-
tests/man5.test | 4 +-
tests/python12.test | 2 +-
...x-registered.test => test-extensions-cond.test} | 62 ++++++++++++-------
tests/test-extensions.test | 23 ++++----
13 files changed, 163 insertions(+), 56 deletions(-)
copy tests/{test-driver-trs-suffix-registered.test =>
test-extensions-cond.test} (57%)
diff --git a/ChangeLog b/ChangeLog
index 6e6783e..59e5fb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,67 @@
+2011-10-07 Stefano Lattarini <address@hidden>
+
+ parallel-tests: warn on conditional TEST_EXTENSIONS definition
+ Before this change, automake would have still bailed out, but
+ with a confusing error message (about an invalid redefinition
+ of TEST_EXTENSIONS).
+ * automake.in (handle_tests): Warn explicitly if TEST_EXTENSIONS
+ has conditional contents.
+ * tests/test-extensions-con.test: New test.
+ * tests/Makefile.am (TESTS): Add it.
+ * NEWS: Update.
+
+2011-10-06 Stefano Lattarini <address@hidden>
+
+ parallel-tests: don't allow @substitutions@ in TEST_EXTENSIONS
+ Even after the last commit `v1.11-476-g90bea64', the checks
+ performed by automake on entries in $(TEST_EXTENSIONS) tried to
+ allow for @substitited@ stuff. This however ends up allowing
+ quite brittle setups, which, most importantly, are of no real
+ practical usefulness anyway. So it's better to just disallow
+ @substitutions@ in TEST_EXTENSIONS altogether, offering a clear
+ error message, instead of risking weird bugs and unexpected
+ behaviors in the generated Makefile.in.
+ * automake.in ($TEST_EXTENSION_PATTERN): Turned from a regular
+ expression ...
+ (is_valid_test_extension): ... into this subroutine. Don't allow
+ generic @substitutions@ anymore (possibly making an exception for
+ address@hidden@' under the proper circumstances).
+ * tests/test-extensions.test: Adjust and extend. This test does
+ not cause any internal error in automake anymore now.
+
+2011-10-06 Stefano Lattarini <address@hidden>
+
+ tests: fix spurious failure in 'insthook.test'
+ * tests/insthook.test (Makefile.am): Add a proper `uninstall-hook'
+ target to remove the symlink created by the `install-exec-hook'
+ target; this prevents "make distcheck" from failing spuriously.
+ Since we are at it, delete an extra blank line, and add a trailing
+ `:' command.
+
+2011-10-06 Stefano Lattarini <address@hidden>
+
+ maintcheck: fix spurious failure
+ * lib/am/distdir.am: Use `$(infodir)', not `${infodir}', to avoid
+ complaints from the `sc_no_brace_variable_expansions' maintainer
+ check.
+
+2011-10-06 Stefano Lattarini <address@hidden>
+
+ tests: fix spurious error in 'test-extensions.test'
+ * tests/test-extensions.test: Call automake with the option
+ `--add-missing', to ensure the required script `test-driver'
+ gets installed. Note that the test still fails due to an
+ internal error in automake, though.
+
+2011-10-06 Stefano Lattarini <address@hidden>
+
+ tests: avoid few useless uses of the `-e' make option
+ * tests/python12.test: Using `make -e' is not required to override
+ the DESTDIR variable, since this variable shouldn't be defined in
+ any automake-generated Makefile.in file.
+ * tests/man2.test: Likewise.
+ * tests/man5.test: Likewise.
+
2011-10-06 Stefano Lattarini <address@hidden>
fix: make a test script executable
diff --git a/Makefile.in b/Makefile.in
index 06c31fe..96278de 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -162,7 +162,7 @@ GZIP_ENV = --best
DIST_TARGETS = dist-bzip2 dist-gzip
distuninstallcheck_listfiles = find . -type f -print
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
- | sed 's|^\./|${prefix}/|' | grep -v '${infodir}/dir$$'
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
diff --git a/NEWS b/NEWS
index 95f69c3..b7500ed 100644
--- a/NEWS
+++ b/NEWS
@@ -156,11 +156,12 @@ Bugs fixed in 1.11a:
does not report spurious successes when used with concurrent FreeBSD
make (e.g., "make check -j3").
- - Automake now explicitly rejects invalid entries in TEST_EXTENSIONS when
- the parallel-tests diver is in use, instead of issuing confusing and
- apparently unrelated error messages (about "non-POSIX variable name"
- or "bad characters in variable name"), or even, in some situations,
- producing broken `Makefile.in' files.
+ - When the parallel-tests driver is in use, automake now explicitly
+ rejects invalid entries and conditional contents in TEST_EXTENSIONS,
+ instead of issuing confusing and apparently unrelated error messages
+ (e.g., "non-POSIX variable name", "bad characters in variable name",
+ or "redefinition of TEST_EXTENSIONS), or even, in some situations,
+ silently producing broken `Makefile.in' files.
- The `silent-rules' option now also silences all compile rules if dependency
tracking is disabled. Also, when `silent-rules' is not used, the output
from
diff --git a/automake.in b/automake.in
index d9caa6e..9d6acc0 100644
--- a/automake.in
+++ b/automake.in
@@ -210,8 +210,6 @@ my $INCLUDE_PATTERN = ('^include\s+'
# Directories installed during 'install-exec' phase.
my $EXEC_DIR_PATTERN =
'^(?:bin|sbin|libexec|sysconf|localstate|lib|pkglib|.*exec.*)' . "\$";
-# Suffixes that can appear in TEST_EXTENSIONS (parallel-tests support).
-my $TEST_EXTENSION_PATTERN = '^(\.[a-zA-Z_][a-zA-Z0-9_]*|@[a-zA-Z0-9_]+@)$';
# Values for AC_CANONICAL_*
use constant AC_CANONICAL_BUILD => 1;
@@ -4847,6 +4845,20 @@ sub handle_per_suffix_test
%transform);
}
+# is_valid_test_extension ($EXT)
+# ------------------------------
+# Return true if $EXT can appear in $(TEST_EXTENSIONS), return false
+# otherwise.
+sub is_valid_test_extension ($)
+{
+ my $ext = shift;
+ return 1
+ if ($ext =~ /^\.[a-zA-Z_][a-zA-Z0-9_]*$/);
+ return 1
+ if (exists $configure_vars{'EXEEXT'} && $ext eq subst ('EXEEXT'));
+ return 0;
+}
+
# Handle TESTS variable and other checks.
sub handle_tests
{
@@ -4888,17 +4900,26 @@ sub handle_tests
$at_exeext = subst ('EXEEXT');
$suff = $at_exeext . ' ' . $suff;
}
- define_variable ('TEST_EXTENSIONS', $suff, INTERNAL);
- # FIXME: this mishandles conditions.
- my $var = rvar 'TEST_EXTENSIONS';
+ if (! var 'TEST_EXTENSIONS')
+ {
+ define_variable ('TEST_EXTENSIONS', $suff, INTERNAL);
+ }
+ my $var = var 'TEST_EXTENSIONS';
+ # Currently, we are not able to deal with conditional contents
+ # in TEST_EXTENSIONS.
+ if ($var->has_conditional_contents)
+ {
+ msg_var 'unsupported', $var,
+ "`TEST_EXTENSIONS' cannot have conditional contents";
+ }
my @test_suffixes = $var->value_as_list_recursive;
if ((my @invalid_test_suffixes =
- grep { !/$TEST_EXTENSION_PATTERN/o } @test_suffixes) > 0)
+ grep { !is_valid_test_extension $_ } @test_suffixes) > 0)
{
error $var->rdef (TRUE)->location,
"invalid test extensions: @invalid_test_suffixes";
}
- @test_suffixes = grep { /$TEST_EXTENSION_PATTERN/o } @test_suffixes;
+ @test_suffixes = grep { is_valid_test_extension $_ } @test_suffixes;
if ($handle_exeext)
{
unshift (@test_suffixes, $at_exeext)
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 81bd62c..7e31f2c 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -533,9 +533,9 @@ distuninstallcheck_listfiles = find . -type f -print
## The `dir' file (created by install-info) might still exist after
## uninstall, so we must be prepared to account for it. The following
## check is not 100% strict, but is definitely good enough, and even
-## accounts for overridden ${infodir}.
+## accounts for overridden $(infodir).
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
- | sed 's|^\./|${prefix}/|' | grep -v '${infodir}/dir$$'
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index e7f700b..1cfe2dc 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1024,6 +1024,7 @@ test-driver-trs-suffix-registered.test \
test-driver-fail.test \
test-driver-is-distributed.test \
test-extensions.test \
+test-extensions-cond.test \
test-harness-vpath-rewrite.test \
test-log.test \
test-logs-repeated.test \
diff --git a/tests/insthook.test b/tests/insthook.test
index ee89057..50b7fd2 100755
--- a/tests/insthook.test
+++ b/tests/insthook.test
@@ -36,6 +36,9 @@ installcheck-local:
test -f "$(bindir)/foo"
test -f "$(bindir)/foo-$(VERSION)"
: > $(top_srcdir)/../ok
+
+uninstall-hook:
+ rm -f $(DESTDIR)$(bindir)/foo-$(VERSION)
END
echo 1 > foo
@@ -62,7 +65,6 @@ grep 1 bin/foo-1.0
grep 2 bin/foo-2.0
grep 2 bin/foo
-
# install-hook is an error.
cat >>Makefile.am <<EOF
install-hook:
@@ -72,3 +74,5 @@ EOF
AUTOMAKE_fails
grep install-data-hook stderr
grep install-exec-hook stderr
+
+:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index d283360..add1824 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -698,6 +698,7 @@ test-driver-trs-suffix-registered.test \
test-driver-fail.test \
test-driver-is-distributed.test \
test-extensions.test \
+test-extensions-cond.test \
test-harness-vpath-rewrite.test \
test-log.test \
test-logs-repeated.test \
diff --git a/tests/man2.test b/tests/man2.test
index a4d1815..6777f97 100755
--- a/tests/man2.test
+++ b/tests/man2.test
@@ -39,13 +39,13 @@ $AUTOMAKE
# Let's play with $DESTDIR too, it shouldn't hurt.
./configure --prefix='' --mandir=/man
-DESTDIR="`pwd`/_inst" $MAKE -e install
+$MAKE DESTDIR="`pwd`/_inst" install
test -f ./_inst/man/man2/foo.2
test -f ./_inst/man/man4/foo.4
test -f ./_inst/man/man4/bar.4
-DESTDIR="`pwd`/_inst" $MAKE -e uninstall
+$MAKE DESTDIR="`pwd`/_inst" uninstall
test ! -f ./_inst/man/man2/foo.2
test ! -f ./_inst/man/man4/foo.4
diff --git a/tests/man5.test b/tests/man5.test
index 28bcff0..955442e 100755
--- a/tests/man5.test
+++ b/tests/man5.test
@@ -42,7 +42,7 @@ $AUTOMAKE
# Let's play with $DESTDIR too, it shouldn't hurt.
./configure --mandir=/man
-DESTDIR="`pwd`/_inst" $MAKE -e install
+$MAKE DESTDIR="`pwd`/_inst" install
test -f ./_inst/man/man2/foo.2
test -f ./_inst/man/man2/nfoo.2
@@ -55,7 +55,7 @@ test ! -d ./_inst/man/man1
test ! -d ./_inst/man/man4
test ! -d ./_inst/man/man5
-DESTDIR="`pwd`/_inst" $MAKE -e uninstall
+$MAKE DESTDIR="`pwd`/_inst" uninstall
test ! -f ./_inst/man/man2/foo.2
test ! -f ./_inst/man/man2/nfoo.2
diff --git a/tests/python12.test b/tests/python12.test
index 1ff9b4a..378a0dc 100755
--- a/tests/python12.test
+++ b/tests/python12.test
@@ -42,7 +42,7 @@ instdir=`pwd`/inst
mkdir build
cd build
../configure --prefix="/usr"
-DESTDIR=$instdir $MAKE -e install
+$MAKE install DESTDIR=$instdir
# Perfunctory test that the files were created.
test -f "$instdir/usr/share/my/my.py"
diff --git a/tests/test-driver-trs-suffix-registered.test
b/tests/test-extensions-cond.test
similarity index 57%
copy from tests/test-driver-trs-suffix-registered.test
copy to tests/test-extensions-cond.test
index 4a5b195..41a5b25 100755
--- a/tests/test-driver-trs-suffix-registered.test
+++ b/tests/test-extensions-cond.test
@@ -14,45 +14,59 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# parallel-tests support: the following are registered with `.SUFFIXES':
-# - .log
-# - .trs (used by files that store test results and metadata)
-# - .test if $(TEST_EXTENSIONS) is not defined
-# - stuff in $(TEST_EXTENSIONS) otherwise
+# Expose bug in conditional definition of TEST_EXTENSIONS.
am_parallel_tests=yes
. ./defs || Exit 1
-: > Makefile.am
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([COND], [:])
+AM_CONDITIONAL([COND2], [:])
+END
+
+$ACLOCAL
cat > 1.am << 'END'
TESTS =
+if COND
+## lineno 4
+TEST_EXTENSIONS = .foo
+endif
END
cat > 2.am << 'END'
-TEST_EXTENSIONS = .SH .abcdef
TESTS =
+## lineno 3
+TEST_EXTENSIONS = .foo
+if COND
+# Do nothing.
+else
+TEST_EXTENSIONS += .bar
+endif
END
-: > test-driver
-
-$ACLOCAL
-
-$AUTOMAKE 1
-$AUTOMAKE 2
-
-sed -e 's/$/ /' 1.in > mk.1
-sed -e 's/$/ /' 2.in > mk.2
-
-grep '^\.SUFFIXES:' mk.1
-grep '^\.SUFFIXES:' mk.2
+cat > 3.am << 'END'
+TESTS =
+if COND
+if !COND2
+TESTS = x
+else
+## lineno 7
+TEST_EXTENSIONS = .foo
+endif
+endif
+END
-for suf in test log trs; do
- grep "^\\.SUFFIXES:.* \\.$suf " mk.1
-done
+: > test-driver
-for suf in SH abcdef log trs; do
- grep "^\\.SUFFIXES:.* \\.$suf " mk.2
+for i in 1 2 3; do
+ AUTOMAKE_fails $i
+ lineno=`sed -n 's/^## lineno //p' $i.am` \
+ && test 0 -lt "$lineno" \
+ || Exit 99
+ grep "^$i\\.am:$lineno:.*TEST_EXTENSIONS.*conditional content" stderr
done
:
diff --git a/tests/test-extensions.test b/tests/test-extensions.test
index dc820ed..5c8107d 100755
--- a/tests/test-extensions.test
+++ b/tests/test-extensions.test
@@ -24,29 +24,29 @@ am_parallel_tests=yes
set -e
cat >> configure.in <<'END'
-AC_SUBST([ext], [".e"])
AC_OUTPUT
END
$ACLOCAL
$AUTOCONF
-cat > Makefile.am << 'END'
-TESTS =
-TEST_EXTENSIONS = .sh .T .t1 ._foo .BAR .x_Y_z ._ @ext@
-END
+valid_extensions='sh T t1 _foo BAR x_Y_z _'
+
+echo TESTS = > Makefile.am
+echo " $valid_extensions" \
+ | sed -e 's/ / ./g' -e 's/^/TEST_EXTENSIONS =/' >> Makefile.am
+cat Makefile.am # For debugging.
-$AUTOMAKE
+$AUTOMAKE -a
-$EGREP -i 'log|ext' Makefile.in # For debugging.
+grep -i 'log' Makefile.in # For debugging.
-for lc in sh T t1 _foo BAR x_Y_z _; do
+for lc in $valid_extensions; do
uc=`echo $lc | tr '[a-z]' '[A-Z]'`
$FGREP "\$(${uc}_LOG_COMPILER)" Makefile.in
grep "^${uc}_LOG_COMPILE =" Makefile.in
grep "^\.${lc}\.log:" Makefile.in
done
-grep "address@hidden@\.log:" Makefile.in
# The produced Makefile is not broken.
./configure
@@ -54,11 +54,12 @@ $MAKE all check
cat > Makefile.am << 'END'
TESTS = foo.test bar.sh
-TEST_EXTENSIONS = .test mu .x-y a-b .t.1 .sh .6c .0 .11 .@ .t33 .a=b _&_
+TEST_EXTENSIONS = .test mu .x-y a-b .t.1 .sh .6c .0 .11 .= @suf@
address@hidden@
+TEST_EXTENSIONS += .= .t33 address@hidden _&_
END
AUTOMAKE_fails
-for suf in mu .x-y a-b .t.1 .6c .0 .11 '.@' '.a=b' '_&_'; do
+for suf in mu .x-y a-b .t.1 .6c .0 .11 @suf@ address@hidden@ '.=' '_&_'; do
suf2=`printf '%s\n' "$suf" | sed -e 's/\./\\./'`
$EGREP "^Makefile\.am:2:.*invalid test extension.* $suf2( |$)" stderr
done
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, testsuite-work, updated. v1.11-1474-g3305854,
Stefano Lattarini <=