automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, tests-init, updated. v1.11-


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, tests-init, updated. v1.11-419-gb5e5333
Date: Thu, 11 Nov 2010 13:42:01 +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=b5e533390ea8c3d2952f5a5c57a514274dee9fd2

The branch, tests-init has been updated
       via  b5e533390ea8c3d2952f5a5c57a514274dee9fd2 (commit)
       via  cb23608ac99ce2b62f53f5100f19d1cf8607423d (commit)
       via  8664afc28e9ed03e0f50be76d36b010925bd0d6f (commit)
       via  9a68760e4d3651f66080717568f2517dbadb52fd (commit)
       via  0e6c1d223906537af7480bf623904121bf88a0b2 (commit)
       via  b06239692cb5808af5834b71a3acf45a1c763888 (commit)
       via  733cd3d8445f65e25ec8bdb507fa6dda2dbcb985 (commit)
       via  498bb93fe6fcd255959990c411a438a2d0cf1fa3 (commit)
       via  d402d06c01d3f065ce7d2c0d05885d1873dac410 (commit)
      from  b191caac0e3ddb749d552565e4804d93a36b470e (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 b5e533390ea8c3d2952f5a5c57a514274dee9fd2
Author: Stefano Lattarini <address@hidden>
Date:   Fri Nov 5 21:29:17 2010 +0100

    Tests defs: move static definitions in a new file `defs-static'.
    
    The new file is meant to be idempotent w.r.t. mutiple inclusions.
    
    * tests/defs.in: Removed, its contents split among ...
    * tests/defs-static.in: ... this new file ...
    * tests/defs: ... and this new file, including the former.
    * configure.ac (AC_CONFIG_FILES): Remove `tests/defs', add
    `tests/defs-static'.
    (AC_CONFIG_LINKS): Add `tests/defs'.
    * tests/Makefile.am ($(parallel_tests)): Update.
    ($(instspc_tests)): Likewise.
    * tests/.gitignore: Update.

commit cb23608ac99ce2b62f53f5100f19d1cf8607423d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Nov 5 18:10:41 2010 +0100

    Tests defs: $testsbuilddir is now AC_SUBST'ed.
    
    * tests/defs.in ($testsbuilddir): Substitute from @address@hidden
    Add sanity check on $testsbuilddir, similar to those on
    $testsrcdir and $top_testsrcdir.

commit 8664afc28e9ed03e0f50be76d36b010925bd0d6f
Author: Stefano Lattarini <address@hidden>
Date:   Wed Sep 8 17:50:19 2010 +0200

    Tests defs: do not print message "Running test $0" anymore.
    
    * tests/defs.in: Printing the message "=== Running test $0" at
    the beginning of each tests made sense when Automake used the old
    test-driver, which sent all the output directly to stdout/stderr.
    Now that the parallel test-driver is used, which saves output of
    each test in its correspoding log file, that old message is just
    useless noise.

commit 9a68760e4d3651f66080717568f2517dbadb52fd
Author: Stefano Lattarini <address@hidden>
Date:   Fri Nov 5 17:23:31 2010 +0100

    Tests defs: rename $curdir -> $testbuilddir
    
    * tests/defs.in: Rename $curdir to $testbuildir, for clarity and
    consistency with $testsrcdir and $top_testsrcdir.

commit 0e6c1d223906537af7480bf623904121bf88a0b2
Author: Stefano Lattarini <address@hidden>
Date:   Fri Nov 5 17:20:55 2010 +0100

    Tests defs: prefer "$curdir" over "`pwd`".
    
    * tests/defs.in: We already save the value of `pwd` in $curdir
    early in the file, so there no need to recalculate it later, when
    the current working directory is not changed.

commit b06239692cb5808af5834b71a3acf45a1c763888
Author: Stefano Lattarini <address@hidden>
Date:   Wed Nov 10 23:53:28 2010 +0100

    Tests defs: use `$me' in more error messages.
    
    * tests/defs.in: Also use `$me' in error messages referring to
    missing `defs' or `defs.in', since that variable is now defined
    before those checks.

commit 733cd3d8445f65e25ec8bdb507fa6dda2dbcb985
Author: Stefano Lattarini <address@hidden>
Date:   Wed Nov 10 23:49:32 2010 +0100

    Tests defs: do not use `Exit' where plain `exit' suffices.
    
    * tests/defs.in: Use "exit 77" rather than "Exit 77" to skip the
    test when required libtool/gettext macros are not found, since
    such skips would take place before the exit trap is installed.

commit 498bb93fe6fcd255959990c411a438a2d0cf1fa3
Author: Stefano Lattarini <address@hidden>
Date:   Wed Nov 10 23:46:57 2010 +0100

    Tests defs: improve and extends comments.
    
    * tests/defs.in: Improve and extends some comments, especially in
    relation with the changes introduced by the previous reordering.

commit d402d06c01d3f065ce7d2c0d05885d1873dac410
Author: Stefano Lattarini <address@hidden>
Date:   Wed Jun 2 22:25:25 2010 +0200

    Tests defs: various reorderings.
    
    * tests/defs.in: Reordered various snippets of code in a
    clearer way.

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

Summary of changes:
 ChangeLog               |   54 +++++++
 configure               |   45 +++++-
 configure.ac            |    3 +-
 tests/.gitignore        |    2 +-
 tests/Makefile.am       |    6 +-
 tests/Makefile.in       |   18 +-
 tests/{defs.in => defs} |  384 ++++++++++++++++++++++-------------------------
 tests/defs-static.in    |   98 ++++++++++++
 8 files changed, 384 insertions(+), 226 deletions(-)
 rename tests/{defs.in => defs} (74%)
 create mode 100644 tests/defs-static.in

diff --git a/ChangeLog b/ChangeLog
index 657ea37..7d439bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,57 @@
+2010-11-10  Stefano Lattarini  <address@hidden>
+
+       Tests defs: move static definitions in a new file `defs-static'.
+       The new file is meant to be idempotent w.r.t. mutiple inclusions.
+       * tests/defs.in: Removed, its contents split among ...
+       * tests/defs-static.in: ... this new file ...
+       * tests/defs: ... and this new file, including the former.
+       * configure.ac (AC_CONFIG_FILES): Remove `tests/defs', add
+       `tests/defs-static'.
+       (AC_CONFIG_LINKS): Add `tests/defs'.
+       * tests/Makefile.am ($(parallel_tests)): Update.
+       ($(instspc_tests)): Likewise.
+       * tests/.gitignore: Update.
+
+       Tests defs: $testsbuilddir is now AC_SUBST'ed.
+       * tests/defs.in ($testsbuilddir): Substitute from @address@hidden
+       Add sanity check on $testsbuilddir, similar to those on
+       $testsrcdir and $top_testsrcdir.
+
+       Tests defs: do not print message "Running test $0" anymore.
+       * tests/defs.in: Printing the message "=== Running test $0" at
+       the beginning of each tests made sense when Automake used the old
+       test-driver, which sent all the output directly to stdout/stderr.
+       Now that the parallel test-driver is used, which saves output of
+       each test in its correspoding log file, that old message is just
+       useless noise.
+
+       Tests defs: rename $curdir -> $testbuilddir
+       * tests/defs.in: Rename $curdir to $testbuildir, for clarity and
+       consistency with $testsrcdir and $top_testsrcdir.
+
+       Tests defs: prefer "$curdir" over "`pwd`".
+       * tests/defs.in: We already save the value of `pwd` in $curdir
+       early in the file, so there no need to recalculate it later, when
+       the current working directory is not changed.
+
+       Tests defs: use `$me' in more error messages.
+       * tests/defs.in: Also use `$me' in error messages referring to
+       missing `defs' or `defs.in', since that variable is now defined
+       before those checks.
+
+       Tests defs: do not use `Exit' where plain `exit' suffices.
+       * tests/defs.in: Use "exit 77" rather than "Exit 77" to skip the
+       test when required libtool/gettext macros are not found, since
+       such skips would take place before the exit trap is installed.
+
+       Tests defs: improve and extends comments.
+       * tests/defs.in: Improve and extends some comments, especially in
+       relation with the changes introduced by the previous reordering.
+
+       Tests defs: various reorderings.
+       * tests/defs.in: Reordered various snippets of code in a
+       clearer way.
+
 2010-11-06  Stefano Lattarini  <address@hidden>
 
        New tests on obsoleted usages of automake/autoconf macros (such
diff --git a/configure b/configure
index 169d82d..024b620 100755
--- a/configure
+++ b/configure
@@ -2783,7 +2783,9 @@ $as_echo "$as_me: WARNING: \`cd tests && ${MAKE-make} 
clean-local-check'" >&2;}
 sh_errexit_works=$am_cv_sh_errexit_works
 
 
-ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile 
lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile 
tests/Makefile tests/defs"
+ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile 
lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile 
tests/Makefile tests/defs-static"
+
+ac_config_links="$ac_config_links tests/defs:tests/defs"
 
 ac_config_files="$ac_config_files tests/aclocal-${APIVERSION}:tests/aclocal.in"
 
@@ -3375,6 +3377,7 @@ esac
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 # Files that config.status was made for.
 config_files="$ac_config_files"
+config_links="$ac_config_links"
 
 _ACEOF
 
@@ -3399,6 +3402,9 @@ Usage: $0 [OPTION]... [TAG]...
 Configuration files:
 $config_files
 
+Configuration links:
+$config_links
+
 Report bugs to <address@hidden>.
 GNU Automake home page: <http://www.gnu.org/software/automake/>.
 General help using GNU software: <http://www.gnu.org/gethelp/>."
@@ -3533,7 +3539,8 @@ do
     "lib/am/Makefile") CONFIG_FILES="$CONFIG_FILES lib/am/Makefile" ;;
     "m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
     "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
-    "tests/defs") CONFIG_FILES="$CONFIG_FILES tests/defs" ;;
+    "tests/defs-static") CONFIG_FILES="$CONFIG_FILES tests/defs-static" ;;
+    "tests/defs") CONFIG_LINKS="$CONFIG_LINKS tests/defs:tests/defs" ;;
     "tests/aclocal-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES 
tests/aclocal-${APIVERSION}:tests/aclocal.in" ;;
     "tests/automake-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES 
tests/automake-${APIVERSION}:tests/automake.in" ;;
 
@@ -3548,6 +3555,7 @@ done
 # bizarre bug on SunOS 4.1.3.
 if $ac_need_defaults; then
   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
 fi
 
 # Have a temporary directory for convenience.  Make it in the build tree
@@ -3736,7 +3744,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 fi # test -n "$CONFIG_FILES"
 
 
-eval set X "  :F $CONFIG_FILES      "
+eval set X "  :F $CONFIG_FILES    :L $CONFIG_LINKS  "
 shift
 for ac_tag
 do
@@ -3956,7 +3964,38 @@ which seems to be undefined.  Please make sure it is 
defined" >&2;}
   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
 
+  :L)
+  #
+  # CONFIG_LINK
+  #
+
+  if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+    :
+  else
+    # Prefer the file from the source tree if names are identical.
+    if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+      ac_source=$srcdir/$ac_source
+    fi
 
+    { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" 
>&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+
+    if test ! -r "$ac_source"; then
+      as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+    fi
+    rm -f "$ac_file"
+
+    # Try a relative symlink, then a hard link, then a copy.
+    case $ac_source in
+    [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+       *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+    esac
+    ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+      ln "$ac_source" "$ac_file" 2>/dev/null ||
+      cp -p "$ac_source" "$ac_file" ||
+      as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+  fi
+ ;;
 
   esac
 
diff --git a/configure.ac b/configure.ac
index 079525d..577541c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -203,8 +203,9 @@ AC_CONFIG_FILES([
   lib/am/Makefile
   m4/Makefile
   tests/Makefile
-  tests/defs
+  tests/defs-static
 ])
+AC_CONFIG_LINKS([tests/defs:tests/defs])
 AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
                 [chmod +x tests/aclocal-${APIVERSION}],
                [APIVERSION=$APIVERSION])
diff --git a/tests/.gitignore b/tests/.gitignore
index ff89b40..026e261 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,6 +1,6 @@
 aclocal-*
 automake-*
-defs
+defs-static
 instspc-tests.am
 parallel-tests.am
 *.dir
diff --git a/tests/Makefile.am b/tests/Makefile.am
index d5ae622..816883e 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -39,8 +39,7 @@ $(parallel_tests): Makefile.am
          echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
          echo; \
          echo '# Ensure proper definition of $$testsrcdir.'; \
-         echo 'am_skip_defs=yes'; \
-         echo '. ./defs || exit 99'; \
+         echo '. ./defs-static || exit 99'; \
          echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
          echo; \
          echo "# Run the test with Automake's parallel-tests driver enabled."; 
\
@@ -76,8 +75,7 @@ $(instspc_tests): Makefile.am
            echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
            echo; \
            echo '# Ensure proper definition of $$testsrcdir.'; \
-           echo 'am_skip_defs=yes'; \
-           echo '. ./defs || exit 99'; \
+           echo '. ./defs-static || exit 99'; \
            echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
            echo; \
            echo "instspc_test_name='$$name'"; \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index deab171..66f867d 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -49,8 +49,9 @@ PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in \
-       $(srcdir)/instspc-tests.am $(srcdir)/parallel-tests.am
+       $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs \
+       $(srcdir)/defs-static.in $(srcdir)/instspc-tests.am \
+       $(srcdir)/parallel-tests.am
 subdir = tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
@@ -64,8 +65,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
-CONFIG_CLEAN_FILES = defs aclocal-${APIVERSION} automake-${APIVERSION}
-CONFIG_CLEAN_VPATH_FILES =
+CONFIG_CLEAN_FILES = defs-static aclocal-${APIVERSION} \
+       automake-${APIVERSION}
+CONFIG_CLEAN_VPATH_FILES = defs
 AM_V_GEN = $(am__v_GEN_$(V))
 am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
 am__v_GEN_0 = @echo "  GEN     " $@;
@@ -1177,7 +1179,7 @@ $(top_srcdir)/configure:  $(am__configure_deps)
 $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
-defs: $(top_builddir)/config.status $(srcdir)/defs.in
+defs-static: $(top_builddir)/config.status $(srcdir)/defs-static.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
 aclocal-${APIVERSION}: $(top_builddir)/config.status $(srcdir)/aclocal.in
        cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
@@ -1496,8 +1498,7 @@ $(parallel_tests): Makefile.am
          echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
          echo; \
          echo '# Ensure proper definition of $$testsrcdir.'; \
-         echo 'am_skip_defs=yes'; \
-         echo '. ./defs || exit 99'; \
+         echo '. ./defs-static || exit 99'; \
          echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
          echo; \
          echo "# Run the test with Automake's parallel-tests driver enabled."; 
\
@@ -1527,8 +1528,7 @@ $(instspc_tests): Makefile.am
            echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
            echo; \
            echo '# Ensure proper definition of $$testsrcdir.'; \
-           echo 'am_skip_defs=yes'; \
-           echo '. ./defs || exit 99'; \
+           echo '. ./defs-static || exit 99'; \
            echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
            echo; \
            echo "instspc_test_name='$$name'"; \
diff --git a/tests/defs.in b/tests/defs
similarity index 74%
rename from tests/defs.in
rename to tests/defs
index fe67b0f..50d074e 100644
--- a/tests/defs.in
+++ b/tests/defs
@@ -1,5 +1,4 @@
 # -*- shell-script -*-
-# @configure_input@
 #
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
@@ -17,81 +16,129 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Defines for Automake testing environment.
-# Tom Tromey <address@hidden>
-
-# Absolutely necessary variable(s).
-testsrcdir='@abs_srcdir@'
-top_testsrcdir='@abs_top_srcdir@'
-
-# Protect this file against multiple inclusion, useful for generated tests.
-if test x"$am_skip_defs" = xyes; then
-  unset am_skip_defs
-
-else # Do proper testcase setup.
-
-# Be more Bourne compatible.
-# (Snippet copied from configure's initialization in Autoconf 2.64)
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
-  emulate sh
-  NULLCMD=:
-  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
-  # is contrary to our usage.  Disable this feature.
-  alias -g '${1+"$@"}'='"$@"'
-  setopt NO_GLOB_SUBST
-else
-  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
+## -------------------------------------------------------- ##
+##  Source static setup and definitions for the testsuite.  ##
+## -------------------------------------------------------- ##
 
 # Ensure we are running from the right directory.
-test -f ./defs || {
-   echo "defs: not found in current directory" 1>&2
+test -f ./defs-static || {
+   echo "$0: ./defs-static: not found in current directory" >&2
    exit 1
 }
 
+# Source the shell sanitization and variables' definitions.
+. ./defs-static || exit 99
+
+# The name of the current test (without the `.test' suffix.)
+me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+
+
+## ---------------------------------------- ##
+##  Sanity checks and environment cleanup.  ##
+## ---------------------------------------- ##
+
 # Ensure $testsrcdir is set correctly.
-test -f "$testsrcdir/defs.in" || {
-   echo "$testsrcdir/defs.in not found, check \$testsrcdir" 1>&2
+test -f "$testsrcdir/defs-static.in" || {
+   echo "$me: $testsrcdir/defs-static.in not found, check \$testsrcdir" >&2
    exit 1
 }
 
-me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+# Ensure $testbuilddir is set correctly.
+test -f "$testbuilddir/defs-static" || {
+   echo "$me: $testbuilddir/defs-static not found, check \$testbuilddir" >&2
+   exit 1
+}
 
-APIVERSION='@APIVERSION@'
-PATH_SEPARATOR='@PATH_SEPARATOR@'
-
-# Make sure we override the user shell.
-SHELL='@SHELL@'
-export SHELL
-# User can override various tools used.
-test -z "$PERL" && PERL='@PERL@'
-test -z "$MAKE" && MAKE=make
-test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
-test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
-test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
-test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
-# Use -Werror because this also turns some Perl warnings into error.
-# (Tests for which this is inappropriate should use -Wno-error.)
-test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
-# Extra flags to pass to aclocal before all other flags added by this script.
-ACLOCAL_TESTSUITE_FLAGS=
-export ACLOCAL_TESTSUITE_FLAGS
-
-# See how Automake should be run.  We put --foreign as the default
-# strictness to avoid having to create lots and lots of files.  A test
-# can override this by specifying a different strictness.  Use -Wall
-# -Werror by default.  Tests for which this is inappropriate
-# (e.g. when testing that a warning is enabled by a specific switch)
-# should use -Wnone or/and -Wno-error
-test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
-
-PATH="`pwd`$PATH_SEPARATOR$PATH"
+# Unset some MAKE... variables that may cause $MAKE to act like a
+# recursively invoked sub-make.  Any $MAKE invocation in a test is
+# conceptually an independent invocation, not part of the main
+# 'automake' build.
+unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
+# Unset verbosity flag.
+unset V
+# Also unset variables that will let `make -e install' divert
+# files into unwanted directories.
+unset DESTDIR
+unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
+unset htmldir includedir infodir libdir libexecdir localedir mandir
+unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+# The tests call `make -e' but we do not want $srcdir from the environment
+# to override the definition from the Makefile.
+unset srcdir
+# Also unset variables that control our test driver.  While not
+# conceptually independent, they cause some changed semantics we
+# need to control (and test for) in some of the tests to ensure
+# backward-compatible behavior.
+unset DISABLE_HARD_ERRORS
+unset TESTS
+unset TEST_LOG_COMPILER
+unset TEST_LOGS
+unset RECHECK_LOGS
+unset VERBOSE
+
+
+## ---------------------------- ##
+##  Auxiliary shell functions.  ##
+## ---------------------------- ##
+
+# 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
+}
+
+# is_newest FILE FILES
+# --------------------
+# Return false if any file in FILES is newer than FILE.
+# Resolve ties in favor of FILE.
+is_newest ()
+{
+  is_newest_files=`find "$@" -newer "$1"`
+  test -z "$is_newest_files"
+}
+
+# AUTOMAKE_run status [options...]
+# --------------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_run ()
+{
+  expected_exitcode=$1
+  shift
+  exitcode=0
+  $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$?
+  cat stderr >&2
+  cat stdout
+  test $exitcode = $expected_exitcode || Exit 1
+}
+
+# AUTOMAKE_fails [options...]
+# ---------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_fails ()
+{
+  AUTOMAKE_run 1 ${1+"$@"}
+}
+
+
+## ----------------------------------------------------------- ##
+##  Checks for required tools, and additional setups (if any)  ##
+##  required by them.                                          ##
+## ----------------------------------------------------------- ##
+
+# Print it here, so that the user will see it also if the test
+# will be skipped due to some tool missing in $PATH itslef.
 echo "$PATH"
-# Some shells forget to export modified environment variables.
-# (See note about `export' in the Autoconf manual.)
-export PATH
 
+# Look for (and maybe set up) required tools and/or system features; skip
+# the current test if they are not found.
 for tool in : $required
 do
   # Check that each required tool is present.
@@ -223,7 +270,7 @@ do
     tex)
       # No all versions of Tex support `--version', so we use
       # a configure check.
-      test -n "@TEX@" || exit 77
+      test -n "$TEX" || exit 77
       ;;
     texi2dvi-o)
       # Texi2dvi supports `-o' since Texinfo 4.1.
@@ -238,99 +285,6 @@ do
   esac
 done
 
-# 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 || {
-  find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
-  rm -rf $testSubDir
-}
-mkdir $testSubDir
-
address@hidden@
-if test "$sh_errexit_works" = yes; then
-  trap 'exit_status=$?
-    set +e
-    cd "$curdir"
-    case $exit_status,$keep_testdirs in
-    0,)
-      find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
-      rm -rf $testSubDir
-      ;;
-    esac
-    test "$signal" != 0 &&
-      echo "$me: caught signal $signal"
-    echo "$me: exit $exit_status"
-    exit $exit_status
-  ' 0
-  for signal in 1 2 13 15; do
-    trap 'signal='$signal'; { Exit 1; }' $signal
-  done
-fi
-signal=0
-
-# Copy in some files we need.
-for file in install-sh missing depcomp; do
-   cp "$top_testsrcdir/lib/$file" "$testSubDir/$file" || Exit 1
-done
-
-cd ./$testSubDir
-
-# Build appropriate environment in test directory.  Eg create
-# configure.in, touch all necessary files, etc.
-# Don't use AC_OUTPUT, but AC_CONFIG_FILES so that appending
-# still produces a valid configure.ac.  But then, tests running
-# config.status really need to append AC_OUTPUT.
-{
-  echo "AC_INIT([$me], [1.0])"
-  if test x"$parallel_tests" = x"yes"; then
-    echo "AM_INIT_AUTOMAKE([parallel-tests])"
-  else
-    echo "AM_INIT_AUTOMAKE"
-  fi
-  echo "AC_CONFIG_FILES([Makefile])"
-} >configure.in
-
-# Unset some MAKE... variables that may cause $MAKE to act like a
-# recursively invoked sub-make.  Any $MAKE invocation in a test is
-# conceptually an independent invocation, not part of the main
-# 'automake' build.
-unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
-# Unset verbosity flag.
-unset V
-# Also unset variables that will let `make -e install' divert
-# files into unwanted directories.
-unset DESTDIR
-unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
-unset htmldir includedir infodir libdir libexecdir localedir mandir
-unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
-# The tests call `make -e' but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
-unset srcdir
-# Also unset variables that control our test driver.  While not
-# conceptually independent, they cause some changed semantics we
-# need to control (and test for) in some of the tests to ensure
-# backward-compatible behavior.
-unset DISABLE_HARD_ERRORS
-unset TESTS
-unset TEST_LOG_COMPILER
-unset TEST_LOGS
-unset RECHECK_LOGS
-unset VERBOSE
-
-echo "=== Running test $0"
-
 # We might need extra macros, e.g., from Libtool or Gettext.
 # Find them on the system.
 # Use `-I $top_testsrcdir/m4' in addition to `--acdir=$top_testsrcdir/m4',
@@ -340,7 +294,7 @@ echo "=== Running test $0"
 # some third-party .m4 file is underquoted.
 case " $required " in
   *' libtool '* | *' libtoolize '* | *' gettext '* )
-    aclocaldir='@prefix@/share/aclocal'
+    aclocaldir=$testprefix/share/aclocal
     extra_includes=""
     if test -f $aclocaldir/dirlist; then
        extra_includes=`
@@ -361,73 +315,87 @@ case " $required " in
       fi
     done
     case " $required " in
-      *' libtool '* | *' libtoolize '* ) test $libtool_found = yes || Exit 77;;
-      *' gettext '* ) test $gettext_found = yes || Exit 77;;
+      *' libtool '* | *' libtoolize '* ) test $libtool_found = yes || exit 77;;
+      *' gettext '* ) test $gettext_found = yes || exit 77;;
     esac
     # Libtool cannot cope with spaces in the build tree.  Our testsuite setup
     # cannot cope with spaces in the source tree name for Libtool and gettext
-    # tests.
-    case $testsrcdir,`pwd` in
-      *\ * | *\        *) Exit 77;;
+    # tests.  Using just `$testbuilddir' for the check here is ok, since the
+    # further temporary subdirectory where the test will be run is ensured not
+    # to contain any space.
+    case $testsrcdir,$testbuilddir in
+      *\ * | *\        *) exit 77;;
     esac
     ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I 
$aclocaldir"
     ;;
 esac
 
-# POSIX no longer requires 'egrep' and 'fgrep',
-# but some hosts lack 'grep -E' and 'grep -F'.
-EGREP='@EGREP@'
-FGREP='@FGREP@'
 
-# The amount we should wait after modifying files depends on the platform.
-# For instance, Windows '95, '98 and ME have 2-second granularity
-# and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
+## ---------------------------------------------------------------- ##
+##  Create and set up of the temporary directory used by the test.  ##
+##  Set up of the exit trap for cleanup of said directory.          ##
+## ---------------------------------------------------------------- ##
 
-# An old timestamp that can be given to a file, in "touch -t" format.
-# The time stamp should be portable to all file systems of interest.
-# Just for fun, choose the exact time of the announcement of the GNU project
-# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
-old_timestamp=198309271735.59
+# The subdirectory where the current test script will run and write its
+# temporary/data files.  This will be created shortly, and will be removed
+# by the cleanup trap below if the test passes.  If the test doesn't pass,
+# this directory will be kept, to facilitate debugging.
+testSubDir=$me.dir
 
-# is_newest FILE FILES
-# --------------------
-# Return false if any file in FILES is newer than FILE.
-# Resolve ties in favor of FILE.
-is_newest ()
-{
-  is_newest_files=`find "$@" -newer "$1"`
-  test -z "$is_newest_files"
+test ! -d $testSubDir || {
+  find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
+  rm -rf $testSubDir
 }
+mkdir $testSubDir
 
+cd ./$testSubDir
 
-# AUTOMAKE_run status [options...]
-# --------------------------------
-# Run Automake with OPTIONS, and fail if automake
-# does not exit with STATUS.
-AUTOMAKE_run ()
-{
-  expected_exitcode=$1
-  shift
-  exitcode=0
-  $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$?
-  cat stderr >&2
-  cat stdout
-  test $exitcode = $expected_exitcode || Exit 1
-}
+if test "$sh_errexit_works" = yes; then
+  trap 'exit_status=$?
+    set +e
+    cd "$testbuilddir"
+    case $exit_status,$keep_testdirs in
+    0,)
+      find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
+      rm -rf $testSubDir
+      ;;
+    esac
+    test "$signal" != 0 && echo "$me: caught signal $signal"
+    echo "$me: exit $exit_status"
+    exit $exit_status
+  ' 0
+  for signal in 1 2 13 15; do
+    trap 'signal='$signal'; { Exit 1; }' $signal
+  done
+  signal=0
+fi
 
-# AUTOMAKE_fails [options...]
-# ---------------------------
-# Run Automake with OPTIONS, and fail if automake
-# does not exit with STATUS.
-AUTOMAKE_fails ()
+# Copy in some files we need.
+for file in install-sh missing depcomp; do
+   cp "$top_testsrcdir/lib/$file" . || Exit 1
+done
+
+# Build appropriate environment in test directory.  Eg create
+# configure.in, touch all necessary files, etc.
+# Don't use AC_OUTPUT, but AC_CONFIG_FILES so that appending
+# still produces a valid configure.ac.  But then, tests running
+# config.status really need to append AC_OUTPUT.
 {
-  AUTOMAKE_run 1 ${1+"$@"}
-}
+  echo "AC_INIT([$me], [1.0])"
+  if test x"$parallel_tests" = x"yes"; then
+    echo "AM_INIT_AUTOMAKE([parallel-tests])"
+  else
+    echo "AM_INIT_AUTOMAKE"
+  fi
+  echo "AC_CONFIG_FILES([Makefile])"
+} >configure.in
+
+
+## ---------------- ##
+##  Ready to go...  ##
+## ---------------- ##
 
 # Turn on shell traces.
 set -x
 
 pwd
-
-fi # Proper testcase setup.
diff --git a/tests/defs-static.in b/tests/defs-static.in
new file mode 100644
index 0000000..2ca4b57
--- /dev/null
+++ b/tests/defs-static.in
@@ -0,0 +1,98 @@
+# -*- shell-script -*-
+# @configure_input@
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009, 2010 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/>.
+
+# Defines and minimal setup for Automake testing environment.
+# IMPORTANT: Multiple inclusions of this file should be idempotent!
+
+# Be more Bourne compatible.
+# (Snippet copied from configure's initialization in Autoconf 2.64)
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+
+testsrcdir='@abs_srcdir@'
+top_testsrcdir='@abs_top_srcdir@'
+testbuilddir='@abs_builddir@'
+testprefix='@prefix@'
+
+APIVERSION='@APIVERSION@'
+PATH_SEPARATOR='@PATH_SEPARATOR@'
+
+# Make sure we override the user shell.
+SHELL='@SHELL@'; export SHELL
+# User can override various tools used.
+test -z "$PERL" && PERL='@PERL@'
+test -z "$MAKE" && MAKE=make
+test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
+test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
+test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
+test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
+# Use -Werror because this also turns some Perl warnings into error.
+# (Tests for which this is inappropriate should use -Wno-error.)
+test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
+# Extra flags to pass to aclocal before all other flags added by this script.
+ACLOCAL_TESTSUITE_FLAGS=''; export ACLOCAL_TESTSUITE_FLAGS
+
+# See how Automake should be run.  We put --foreign as the default
+# strictness to avoid having to create lots and lots of files.  A test
+# can override this by specifying a different strictness.  Use -Wall
+# -Werror by default.  Tests for which this is inappropriate
+# (e.g. when testing that a warning is enabled by a specific switch)
+# should use -Wnone or/and -Wno-error
+test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
+
+# POSIX no longer requires 'egrep' and 'fgrep',
+# but some hosts lack 'grep -E' and 'grep -F'.
+EGREP='@EGREP@'
+FGREP='@FGREP@'
+
+# No all versions of Tex support `--version', so we use a configure
+# check to decide if tex is available.  This decision is embodied in
+# this variable.
+TEX='@TEX@'
+
+# Whether /bin/sh has working 'set -e' with exit trap.
+sh_errexit_works='@sh_errexit_works@'
+
+# The amount we should wait after modifying files depends on the platform.
+# For instance, Windows '95, '98 and ME have 2-second granularity
+# and can be up to 3 seconds in the future w.r.t. the system clock.
+sleep='sleep @MODIFICATION_DELAY@'
+
+# An old timestamp that can be given to a file, in "touch -t" format.
+# The time stamp should be portable to all file systems of interest.
+# Just for fun, choose the exact time of the announcement of the GNU project
+# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
+old_timestamp=198309271735.59
+
+# Make our wrapper scripts accessible by default.  And avoid to uselessly
+# extend $PATH multiple times if this file is sourced multiple times.
+case $PATH in
+  "$testbuilddir$PATH_SEPARATOR"*) ;;
+  *) PATH="$testbuilddir$PATH_SEPARATOR$PATH";;
+esac
+export PATH


hooks/post-receive
-- 
GNU Automake



reply via email to

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