automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-776-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-776-g0fea91c
Date: Sun, 17 Apr 2011 13:27:16 +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=0fea91c27930b7d06e2aacc7ddd34420a7665859

The branch, master has been updated
       via  0fea91c27930b7d06e2aacc7ddd34420a7665859 (commit)
       via  95bbdf168467b0aff919f3fdb763a9662ecbf634 (commit)
       via  9e7c4339cefd512255d30446053a9d84bdb619b1 (commit)
       via  5e5919991ae3992dccc7851cb4af504bba0cc26d (commit)
      from  d583aa66634049d78dc6e04e1774bbb4fe437edc (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 0fea91c27930b7d06e2aacc7ddd34420a7665859
Merge: d583aa6 95bbdf1
Author: Stefano Lattarini <address@hidden>
Date:   Sun Apr 17 15:21:34 2011 +0200

    Merge branch 'am-tests-setup'

commit 95bbdf168467b0aff919f3fdb763a9662ecbf634
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jan 24 11:34:32 2011 +0100

    check: new developer-reserved AM_TESTS_SETUP variable
    
    For reference, see the discussion at:
    <http://lists.gnu.org/archive/html/automake-patches/2011-01/msg00213.html>
    
    * lib/am/check.am [%?PARALLEL_TESTS%] (am__check_pre): Pass also
    $(AM_TESTS_SETUP).  Comments updated, and some typos fixed.
    * doc/automake.texi (Simple Tests using parallel-tests): Document
    AM_TESTS_SETUP.  Reorder some of the existing documentation a bit.
    * tests/parallel-tests-am_tests_setup.test: New test.
    
    From a suggestion by Ralf Wildenhues.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                |   22 +++++++
 doc/automake.texi                        |   47 +++++++++++----
 lib/Automake/tests/Makefile.in           |    9 ++-
 lib/am/check.am                          |    9 ++-
 tests/Makefile.am                        |    1 +
 tests/Makefile.in                        |   10 ++-
 tests/depcomp8a.test                     |   12 ++--
 tests/depcomp8b.test                     |   10 ++-
 tests/parallel-tests-am_tests_setup.test |   97 ++++++++++++++++++++++++++++++
 9 files changed, 188 insertions(+), 29 deletions(-)
 create mode 100755 tests/parallel-tests-am_tests_setup.test

diff --git a/ChangeLog b/ChangeLog
index e5caf81..a7541e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2011-04-17  Stefano Lattarini  <address@hidden>
 
+       check: new developer-reserved AM_TESTS_SETUP variable
+       For reference, see the discussion at:
+       
<http://lists.gnu.org/archive/html/automake-patches/2011-01/msg00213.html>
+       * lib/am/check.am [%?PARALLEL_TESTS%] (am__check_pre): Pass also
+       $(AM_TESTS_SETUP).  Comments updated, and some typos fixed.
+       * doc/automake.texi (Simple Tests using parallel-tests): Document
+       AM_TESTS_SETUP.  Reorder some of the existing documentation a bit.
+       * tests/parallel-tests-am_tests_setup.test: New test.
+       From a suggestion by Ralf Wildenhues.
+
+2011-04-17  Stefano Lattarini  <address@hidden>
+
+       depcomp tests: don't reject slower dependency extractors
+       * tests/depcomp8b.test: Add the `--enable-dependency-tracking'
+       option to `configure' invocations, so that slower dependency
+       extractors are not rejected.
+       * tests/depcomp8b.test: Likewise.  Also ...
+       (foo.c): ... since we are at it, fix spacing to be consistent
+       with GNU coding standards.
+
+2011-04-17  Stefano Lattarini  <address@hidden>
+
        m4: add missing serial numbers to a few files
        Fixes automake bug#8483.
        * m4/amversion.in: Add serial number.
diff --git a/doc/automake.texi b/doc/automake.texi
index f89971b..4f971d2 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8702,9 +8702,11 @@ allows to specify inter-test dependencies, lazy reruns 
of tests that
 have not completed in a prior run, summary and verbose output in
 @samp{RST} (reStructuredText) and @samp{HTML} format, and hard errors
 for exceptional failures.  Similar to the simple test driver,
address@hidden, @code{AM_COLOR_TESTS}, @code{XFAIL_TESTS}, and
address@hidden, @code{XFAIL_TESTS}, and
 the @code{check_*} variables are honored, and the environment variable
address@hidden is set during test execution.
address@hidden is set during test execution. Also, @code{TESTS_ENVIRONMENT}
+is still honored, but is complemented by a new developer-reserved variable
address@hidden (described below).
 
 This test driver is still experimental and may undergo changes in order
 to satisfy additional portability requirements.
@@ -8718,6 +8720,16 @@ depends upon log files created for each single test 
program listed in
 @code{TESTS}, which in turn contain all output produced by the
 corresponding tests.
 
address@hidden VERBOSE
+As with the simple driver above, by default one status line is printed
+per completed test, and a short summary after the suite has completed.
+However, standard output and standard error of the test are redirected
+to a per-test log file, so that parallel execution does not produce
+intermingled output.  The output from failed tests is collected in the
address@hidden file.  If the variable @samp{VERBOSE} is set, this
+file is output after the summary.  For best results, the tests should be
+verbose by default now.
+
 @vindex TEST_EXTENSIONS
 @vindex TEST_LOGS
 Each log file is created when the corresponding test has completed.
@@ -8766,15 +8778,28 @@ and @samp{./wrapper-script -d baz} to produce 
@file{foo.log},
 @samp{TESTS_ENVIRONMENT} variable is still expanded before the driver,
 but should be reserved for the user.
 
address@hidden VERBOSE
-As with the simple driver above, by default one status line is printed
-per completed test, and a short summary after the suite has completed.
-However, standard output and standard error of the test are redirected
-to a per-test log file, so that parallel execution does not produce
-intermingled output.  The output from failed tests is collected in the
address@hidden file.  If the variable @samp{VERBOSE} is set, this
-file is output after the summary.  For best results, the tests should be
-verbose by default now.
address@hidden AM_TESTS_SETUP
+The @code{AM_TESTS_SETUP} variable can be used to run initialization code
+and set environment variables for the tests' runs.  The user can still
+employ the @code{TESTS_ENVIRONMENT} variable to override settings from
address@hidden  Note that, for implementation reasons, if the
address@hidden variable is set, its contents @emph{must} be
+terminated by a semicolon.
+
address@hidden
+# The tests below are expected to use the file descriptor passed
+# in the environment variable 'warn_fileno' to print warnings
+# (e.g., about skipped and failed tests).  If this variable were
+# to be set to `2' (i.e. default stderr), the warnings would be
+# redirected by the automake parallel-tests driver into the .log
+# files.  But the AM_TESTS_SETUP definition below will cause the
+# reasons for skip/failure to be printed to the console instead.
+# The user can still override this by setting TESTS_ENVIRONMENT
+# to e.g. `warn_fileno=2' at make runtime, which will cause the
+# warnings to be sent to the .log files again.
+TESTS = test1.sh test2.sh ...
+AM_TESTS_SETUP = exec 9>&2; warn_fileno=9; export warn_fileno;
address@hidden example
 
 @trindex mostlyclean
 @trindex check-html
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index da92880..c0abba1 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -127,9 +127,11 @@ am__text_box = $(AWK) '{                           \
 am__sh_e_setup = case $$- in *e*) set +e;; esac
 # To be inserted before the command running the test.  Creates the
 # directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log, and passes
-# TESTS_ENVIRONMENT.  Save and restore TERM around use of
-# TESTS_ENVIRONMENT, in case that unsets it.
+# containing $f, in $tst the test, in $log the log.  Executes the
+# developer- defined test setup AM_TESTS_SETUP (if any), and passes
+# TESTS_ENVIRONMENT.  Saves and restores TERM around uses of
+# TESTS_ENVIRONMENT and AM_TESTS_SETUP, in case any of them unsets
+# it.
 am__check_pre = \
 $(am__sh_e_setup);                                     \
 $(am__vpath_adj_setup) $(am__vpath_adj)                        \
@@ -144,6 +146,7 @@ if test -f "./$$f"; then dir=./;                    \
 elif test -f "$$f"; then dir=;                         \
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
+$(AM_TESTS_SETUP)                                      \
 $(TESTS_ENVIRONMENT)
 # To be appended to the command running the test.  Handle the stdout
 # and stderr redirection, and catch the exit status.
diff --git a/lib/am/check.am b/lib/am/check.am
index 4d10ce9..1827e01 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -93,9 +93,11 @@ am__sh_e_setup = case $$- in *e*) set +e;; esac
 
 # To be inserted before the command running the test.  Creates the
 # directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log, and passes
-# TESTS_ENVIRONMENT.  Save and restore TERM around use of
-# TESTS_ENVIRONMENT, in case that unsets it.
+# containing $f, in $tst the test, in $log the log.  Executes the
+# developer- defined test setup AM_TESTS_SETUP (if any), and passes
+# TESTS_ENVIRONMENT.  Saves and restores TERM around uses of
+# TESTS_ENVIRONMENT and AM_TESTS_SETUP, in case any of them unsets
+# it.
 am__check_pre =                                                \
 $(am__sh_e_setup);                                     \
 $(am__vpath_adj_setup) $(am__vpath_adj)                        \
@@ -110,6 +112,7 @@ if test -f "./$$f"; then dir=./;                    \
 elif test -f "$$f"; then dir=;                         \
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
+$(AM_TESTS_SETUP)                                      \
 $(TESTS_ENVIRONMENT)
 
 # To be appended to the command running the test.  Handle the stdout
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3bfab8a..0bf882c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -701,6 +701,7 @@ parallel-tests7.test \
 parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
+parallel-tests-am_tests_setup.test \
 parallel-tests-unreadable-log.test \
 parallel-tests-subdir.test \
 parse.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 1e81e0b..531374e 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -132,9 +132,11 @@ am__text_box = $(AWK) '{                           \
 am__sh_e_setup = case $$- in *e*) set +e;; esac
 # To be inserted before the command running the test.  Creates the
 # directory for the log if needed.  Stores in $dir the directory
-# containing $f, in $tst the test, in $log the log, and passes
-# TESTS_ENVIRONMENT.  Save and restore TERM around use of
-# TESTS_ENVIRONMENT, in case that unsets it.
+# containing $f, in $tst the test, in $log the log.  Executes the
+# developer- defined test setup AM_TESTS_SETUP (if any), and passes
+# TESTS_ENVIRONMENT.  Saves and restores TERM around uses of
+# TESTS_ENVIRONMENT and AM_TESTS_SETUP, in case any of them unsets
+# it.
 am__check_pre = \
 $(am__sh_e_setup);                                     \
 $(am__vpath_adj_setup) $(am__vpath_adj)                        \
@@ -149,6 +151,7 @@ if test -f "./$$f"; then dir=./;                    \
 elif test -f "$$f"; then dir=;                         \
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
+$(AM_TESTS_SETUP)                                      \
 $(TESTS_ENVIRONMENT)
 # To be appended to the command running the test.  Handle the stdout
 # and stderr redirection, and catch the exit status.
@@ -962,6 +965,7 @@ parallel-tests7.test \
 parallel-tests8.test \
 parallel-tests9.test \
 parallel-tests10.test \
+parallel-tests-am_tests_setup.test \
 parallel-tests-unreadable-log.test \
 parallel-tests-subdir.test \
 parse.test \
diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test
index 3ac45fe..0f9b7f5 100755
--- a/tests/depcomp8a.test
+++ b/tests/depcomp8a.test
@@ -33,7 +33,7 @@ END
 
 mkdir sub
 cat > foo.c << 'END'
-int main(void)
+int main (void)
 {
   extern int bar;
   return bar;
@@ -51,10 +51,11 @@ grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
 grep 'include.*/\./\$(DEPDIR)' Makefile.in && Exit 1
 
 $AUTOCONF
-./configure
+# Don't reject slower dependency extractors, for better coverage.
+./configure --enable-dependency-tracking
 $MAKE
 ./zardoz
-$MAKE distcheck
+$MAKE DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' distcheck
 
 # Try again with subdir-objects option.
 
@@ -69,9 +70,10 @@ grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' 
Makefile.in
 $EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && Exit 1
 
 $AUTOCONF
-./configure
+# Don't reject slower dependency extractors, for better coverage.
+./configure --enable-dependency-tracking
 $MAKE
 ./zardoz
-$MAKE distcheck
+$MAKE DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' distcheck
 
 :
diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test
index 3ab5243..e4cd632 100755
--- a/tests/depcomp8b.test
+++ b/tests/depcomp8b.test
@@ -47,9 +47,10 @@ grep 'include.*\./\$(DEPDIR)/bar\.P' Makefile.in
 grep 'include.*/\./\$(DEPDIR)' Makefile.in && Exit 1
 
 $AUTOCONF
-./configure
+# Don't reject slower dependency extractors, for better coverage.
+./configure --enable-dependency-tracking
 $MAKE
-$MAKE distcheck
+$MAKE DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' distcheck
 
 # Try again with subdir-objects option.
 
@@ -64,8 +65,9 @@ grep 'include.*[^a-zA-Z0-9_/]sub/\$(DEPDIR)/bar\.P' 
Makefile.in
 $EGREP 'include.*/(\.|sub)/\$\(DEPDIR\)' Makefile.in && Exit 1
 
 $AUTOCONF
-./configure
+# Don't reject slower dependency extractors, for better coverage.
+./configure --enable-dependency-tracking
 $MAKE
-$MAKE distcheck
+$MAKE DISTCHECK_CONFIGURE_FLAGS='--enable-dependency-tracking' distcheck
 
 :
diff --git a/tests/parallel-tests-am_tests_setup.test 
b/tests/parallel-tests-am_tests_setup.test
new file mode 100755
index 0000000..bf0d0c6
--- /dev/null
+++ b/tests/parallel-tests-am_tests_setup.test
@@ -0,0 +1,97 @@
+#! /bin/sh
+# Copyright (C) 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/>.
+
+# parallel-tests: check AM_TESTS_SETUP support, and its interaction
+# with TESTS_ENVIRONMENT.
+
+parallel_tests=yes
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_MKDIR_P
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TEST_EXTENSIONS = .sh .test
+TESTS = foo.test bar.sh
+SH_LOG_COMPILER = sh
+AM_TESTS_SETUP = $(MKDIR_P) quux.dir; exec 9>&2; fd=9; export fd;
+EXTRA_DIST = $(TESTS)
+END
+
+cat > foo.test << 'END'
+#! /bin/sh
+echo "FOO='$FOO'"
+echo "BAR='$BAR'"
+test x"$FOO" = x"$BAR"
+END
+chmod a+x foo.test
+
+cat > bar.sh << 'END'
+: ${fd=2}
+eval "echo 'diagnostic message from test bar' >&${fd}"
+END
+
+minicheck ()
+{
+  cat foo.log
+  cat bar.log
+  test -d quux.dir
+}
+
+miniclean ()
+{
+  rmdir quux.dir
+  rm -f foo.log bar.log test-suite.log
+}
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+FOO=1; export FOO
+
+TESTS_ENVIRONMENT='BAR=1' $MAKE check || { cat test-suite.log; Exit 1; }
+minicheck
+miniclean
+TESTS_ENVIRONMENT='BAR=2' $MAKE check && { cat test-suite.log; Exit 1; }
+minicheck
+miniclean
+
+BAR=$FOO; export BAR
+
+$MAKE check 2>stderr || { cat stderr >&2; Exit1; }
+cat stderr >&2
+minicheck
+grep 'diagnostic message from test bar' stderr
+grep 'diagnostic message from test bar' bar.log && Exit 1
+miniclean
+
+TESTS_ENVIRONMENT='fd=2' $MAKE check 2>stderr || { cat stderr >&2; Exit1; }
+cat stderr >&2
+minicheck
+grep 'diagnostic message from test bar' stderr && Exit 1
+grep 'diagnostic message from test bar' bar.log
+miniclean
+
+$MAKE distcheck
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]