automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, java-work, updated. v1.11-3


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, java-work, updated. v1.11-372-gafe7761
Date: Wed, 04 May 2011 17:20:25 +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=afe776121aab4a44fe8dffcb7c8949c015370f90

The branch, java-work has been updated
       via  afe776121aab4a44fe8dffcb7c8949c015370f90 (commit)
       via  1ada3973ce2ece03695b068477e08253f8d18b5f (commit)
       via  78ea595f035fff5e382df79c95bcf639f53fd12b (commit)
       via  8b3470c0ed6070f6b8d7ce7878284aa0c08aac13 (commit)
       via  305f9120306aab1343da724696aaa88c7f0dd0ab (commit)
       via  d8f365af42b559f1ae46544c2238febfca664f3a (commit)
       via  e9bb4e913957b0388182de7350e198d6fe74bf02 (commit)
       via  214bafdb4f7b97e8897cf8668867a2bbcfc804b2 (commit)
      from  a3988aeac8df3c9b4c1f2ea705ef96f00ab72ce5 (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 afe776121aab4a44fe8dffcb7c8949c015370f90
Merge: a3988ae 1ada397
Author: Stefano Lattarini <address@hidden>
Date:   Wed May 4 19:19:02 2011 +0200

    Merge branch 'maint' into java-work

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

Summary of changes:
 ChangeLog                          |   57 ++++++++++++++++++++++++++++++++++++
 tests/Makefile.am                  |    2 +-
 tests/Makefile.in                  |    2 +-
 tests/README                       |    5 +++
 tests/check-tests-in-builddir.test |   19 +++++++++--
 tests/defs.in                      |   50 +++++++++++++++++++++++--------
 tests/maintclean-vpath.test        |    2 +-
 tests/mclean.test                  |   31 -------------------
 tests/self-check-report.test       |   47 +++++++++++++++++++++++++++++
 9 files changed, 164 insertions(+), 51 deletions(-)
 delete mode 100755 tests/mclean.test
 create mode 100755 tests/self-check-report.test

diff --git a/ChangeLog b/ChangeLog
index d66603e..3b50bf8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,60 @@
+2011-05-04  Stefano Lattarini  <address@hidden>
+
+       tests defs: allow requirements for compilers (mostly dummy)
+       Most of the new requirements that are now accepted in `$required'
+       as consequence of this patch are still dummy.  They are planned
+       to be implemented only in master (or in some derived branch), but
+       having them here (even just as no-op) will allow for an easier
+       integration/backporting of potential new testcases.
+       * tests/defs.in (cc, c++, fortran, fortran77): New requirements,
+       still dummy.
+       (flex): New requirement, picking LEX for configure.
+       (lex): New requirement, alias for `flex'.  A more appropriate
+       implementation, looking for a generic `lex' program, will follow
+       in the future.
+       (yacc): New requirement, alias for `bison'.  A more appropriate
+       implementation, looking for a generic `yacc' program, will follow
+       in the future.
+
+2011-04-24  Stefano Lattarini  <address@hidden>
+
+       tests: fix spurious failure in a test on TESTS (VPATH-related)
+       * check-tests-in-builddir.test: When not using the parallel-tests
+       option, do not check that VPATH components are not present in the
+       displayed test name, since the simple-tests driver do not try to
+       strip them.
+
+2011-04-23  Stefano Lattarini  <address@hidden>
+
+       test: self check subroutines for skipping/failing of tests
+       * tests/self-check-report.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-04-23  Jim Meyering  <address@hidden>
+           Stefano Lattarini  <address@hidden>
+
+       test defs: new subroutines for test skipping/failing
+       * tests/defs.in (Exit): Move definition of this function earlier.
+       (warn_, skip_, fail_, framework_failure_): New functions, inspired
+       to the homonyms in gnulib's tests/init.sh.
+       ($stderr_fileno_): New global variable, used by the new functions
+       above.
+       * tests/README: Updated.
+       From a suggestion by Ralf Wildenhues.
+
+2011-04-23  Stefano Lattarini  <address@hidden>
+
+       tests: fix typo (copy & paste blunder) in heading comment
+       * tests/maintclean-vpath.test: Correctly refer to the sister test
+       as `maintclean.test', not as `maintclean-vpath.test'.
+
+2011-04-23  Stefano Lattarini  <address@hidden>
+
+       tests: remove redundant test `mclean.test'
+       * tests/mclean.test: Remove, it's a weak grepping test completely
+       superseded by the much more complete `maintclean.test'.
+       * tests/Makefile.am (TESTS): Update.
+
 2011-05-03  Stefano Lattarini  <address@hidden>
 
        java tests: use $PATH_SEPARATOR where appropriate
diff --git a/tests/Makefile.am b/tests/Makefile.am
index de1dfda..06dd17c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -48,6 +48,7 @@ TESTS_ENVIRONMENT = \
 
 TESTS = \
 self-check-env-sanitize.test \
+self-check-report.test \
 aclibobj.test \
 aclocal.test \
 aclocal3.test \
@@ -531,7 +532,6 @@ man2.test \
 man3.test \
 man4.test \
 man5.test \
-mclean.test \
 mdate.test \
 mdate2.test \
 mdate3.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index db8a6c0..ffa42c7 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -321,6 +321,7 @@ TESTS_ENVIRONMENT = \
 
 TESTS = \
 self-check-env-sanitize.test \
+self-check-report.test \
 aclibobj.test \
 aclocal.test \
 aclocal3.test \
@@ -804,7 +805,6 @@ man2.test \
 man3.test \
 man4.test \
 man5.test \
-mclean.test \
 mdate.test \
 mdate2.test \
 mdate3.test \
diff --git a/tests/README b/tests/README
index 93f9cbf..26ce3ff 100644
--- a/tests/README
+++ b/tests/README
@@ -100,6 +100,11 @@ Do
   Include ./defs in every test script (see existing tests for examples
   of how to do this).
 
+  Use the `skip_' function to skip tests, with a meaningful message if
+  possible.  Where convenient, use the `warn_' function to print generic
+  warnings, and the `fail_' function for test failures.  Finally, you may
+  use the `framework_fail_' function for hard errors.
+
   For tests that use the `parallel-tests' Automake option, set the shell
   variable `parallel_tests' to "yes" before including ./defs.  Also,
   use for them a name that ends in `-p.test' and does not clash with any
diff --git a/tests/check-tests-in-builddir.test 
b/tests/check-tests-in-builddir.test
index 2d0e423..b588f11 100755
--- a/tests/check-tests-in-builddir.test
+++ b/tests/check-tests-in-builddir.test
@@ -55,16 +55,27 @@ chmod a+x bar.test
 
 $MAKE check >out 2>&1 || { cat out; Exit1; }
 cat out
-grep '\.\./foo' out && Exit 1
-grep '^PASS: foo.test *$' out
+# The simple-tests driver does not strip VPATH components from
+# the name of the test, but the parallel-tests driver should.
+if test x"$parallel_tests" = x"yes"; then
+  grep '\.\./foo' out && Exit 1
+  grep '^PASS: foo.test *$' out
+else
+  grep '^PASS: .*foo.test *$' out
+fi
 grep '^PASS: bar.test *$' out
 
 rm -f test-suite.log foo.log bar.log
 
 FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; Exit1; }
 cat out
-grep '\.\./foo' out && Exit 1
-grep '^FAIL: foo.test *$' out
+# See comments above.
+if test x"$parallel_tests" = x"yes"; then
+  grep '\.\./foo' out && Exit 1
+  grep '^FAIL: foo.test *$' out
+else
+  grep '^FAIL: .*foo.test *$' out
+fi
 grep '^PASS: bar.test *$' out
 
 rm -f test-suite.log foo.log bar.log
diff --git a/tests/defs.in b/tests/defs.in
index c8c0059..f49eb03 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -122,18 +122,54 @@ echo "$PATH"
 # (See note about `export' in the Autoconf manual.)
 export PATH
 
+# We use a trap below for cleanup.  This requires us to go through
+# hoops to get the right exit status transported through the signal.
+# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit ()
+{
+  set +e
+  (exit $1)
+  exit $1
+}
+
+# Print warnings (e.g., about skipped and failed tests) to this file
+# number.  Override by putting, say:
+#   stderr_fileno_=9; export stderr_fileno_; exec 9>&2;
+# in the definition of AM_TESTS_ENVIRONMENT.
+# This is useful when using automake's parallel tests mode, to print the
+# reason for skip/failure to console, rather than to the *.log files.
+: ${stderr_fileno_=2}
+
+# Copied from Gnulib's `tests/init.sh'.
+warn_ () { echo "$@" 1>&$stderr_fileno_; }
+fail_ () { warn_ "$me: failed test: $@"; Exit 1; }
+skip_ () { warn_ "$me: skipped test: $@"; Exit 77; }
+framework_failure_ () { warn_ "$me: set-up failure: $@"; Exit 99; }
+
 for tool in : $required
 do
   # Check that each required tool is present.
   case $tool in
     :) ;;
-    bison)
+    bison|yacc)
       # Since bison is required, we pick YACC for ./configure.
       YACC='bison -y'
       export YACC
       echo "$me: running bison --version"
       ( bison --version ) || exit 77
       ;;
+    flex|lex)
+      # Since flex is required, we pick LEX for ./configure.
+      LEX=flex
+      export LEX
+      echo "$me: running flex --version"
+      flex --version || exit 77
+      ;;
+    cc|c++|fortran|fortran77)
+      echo "$me: dummy requirement '$tool', no check done"
+      ;;
     bzip2)
       # Do not use --version, bzip2 still tries to compress stdin.
       echo "$me: running bzip2 --help"
@@ -283,18 +319,6 @@ case "$srcdir" in
     ;;
 esac
 
-# We use a trap below for cleanup.  This requires us to go through
-# hoops to get the right exit status transported through the signal.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
-# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function.
-Exit ()
-{
-  set +e
-  (exit $1)
-  exit $1
-}
-
 curdir=`pwd`
 testSubDir=$me.dir
 test ! -d $testSubDir || {
diff --git a/tests/maintclean-vpath.test b/tests/maintclean-vpath.test
index 8dd2a95..4b93ab1 100755
--- a/tests/maintclean-vpath.test
+++ b/tests/maintclean-vpath.test
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure distclean and maintainer-clean erase the right files.
-# This test is for VPATH builds; see sister test `maintclean-vpath.test'
+# This test is for VPATH builds; see sister test `maintclean.test'
 # for in-tree builds.
 
 . ./defs || Exit 1
diff --git a/tests/mclean.test b/tests/mclean.test
deleted file mode 100755
index dcbe818..0000000
--- a/tests/mclean.test
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999, 2001, 2002  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 MAINTAINERCLEANFILES works.
-# Report from Paul D. Smith.
-
-. ./defs || Exit 1
-
-cat > Makefile.am << 'END'
-MAINTAINERCLEANFILES = foo
-END
-
-: > FOO
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-grep 'rm -f .*MAINTAINERCLEANFILES' Makefile.in
diff --git a/tests/self-check-report.test b/tests/self-check-report.test
new file mode 100755
index 0000000..639319a
--- /dev/null
+++ b/tests/self-check-report.test
@@ -0,0 +1,47 @@
+#! /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/>.
+
+# Sanity check for the automake testsuite.
+# Test subroutines to report warnings, and to signal failures, skips
+# and hard errors.
+
+. ./defs || Exit 1
+
+set +e
+
+exec 5>&1
+
+(warn_ foobar) 2>&1 1>&5 | grep '^foobar$'             || Exit 1
+(fail_ foo); test $? -eq 1                             || Exit 1
+(fail_ foo) 2>&1 1>&5 | grep "^$me: failed test: foo"  || Exit 1
+(skip_ foo); test $? -eq 77                            || Exit 1
+(skip_ foo) 2>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
+(framework_failure_ foo); test $? -eq 99               || Exit 1
+(framework_failure_ foo) 2>&1 1>&5 \
+  | grep "^$me: set-up failure: foo"                   || Exit 1
+
+stderr_fileno_=6
+
+(warn_ foobar) 6>&1 1>&5 | grep '^foobar$'             || Exit 1
+(fail_ foo); test $? -eq 1                             || Exit 1
+(fail_ foo) 6>&1 1>&5 | grep "^$me: failed test: foo"  || Exit 1
+(skip_ foo); test $? -eq 77                            || Exit 1
+(skip_ foo) 6>&1 1>&5 | grep "^$me: skipped test: foo" || Exit 1
+(framework_failure_ foo); test $? -eq 99               || Exit 1
+(framework_failure_ foo) 6>&1 1>&5 \
+  | grep "^$me: set-up failure: foo"                   || Exit 1
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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