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-1850


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-1850-gee07d99
Date: Mon, 13 Feb 2012 23:00:37 +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=ee07d99289e9da3f601fe3f5512d20516fdb4f58

The branch, master has been updated
       via  ee07d99289e9da3f601fe3f5512d20516fdb4f58 (commit)
       via  36eef89b91db0eff6a1cb9f51df8d50f728e54f0 (commit)
      from  b3f34caa4a4b9ff6862f3b4f1d45560ea4ffee5f (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 ee07d99289e9da3f601fe3f5512d20516fdb4f58
Author: Stefano Lattarini <address@hidden>
Date:   Mon Feb 13 23:54:24 2012 +0100

    tests: avoid a spurious failure on NetBSD
    
    * tests/test-driver-is-distributed.test: Rewrite to avoid having to
    edit configure.in; such editing was subtly botched on NetBSD (the
    'AC_CONFIG_AUX_DIR' call got misplaced, ending up *before* the
    'AC_INIT' call), and that caused an hard-to-track bug.  Since we
    are at it, extend coverage a little.

commit 36eef89b91db0eff6a1cb9f51df8d50f728e54f0
Author: Stefano Lattarini <address@hidden>
Date:   Mon Feb 13 22:24:35 2012 +0100

    tests: avoid spurious failure with NetBSD /bin/ksh
    
    * tests/parallel-tests-fd-redirect-exeext.test (configure.in): Tweak
    so that we don't end up with the generated configure script having
    two nested subshells that start with '((':
    
      ((./conftest$EXEEXT 9>&1) | grep "^foobar") >&5 2>&5
    
    which is unportable and could confuse some shells (e.g., NetBSD 5.1
    /bin/ksh) into thinking we are trying to perform an arithmetic
    operation.

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

Summary of changes:
 tests/parallel-tests-fd-redirect-exeext.test |    6 +-
 tests/test-driver-is-distributed.test        |  131 +++++++++++++-------------
 2 files changed, 71 insertions(+), 66 deletions(-)

diff --git a/tests/parallel-tests-fd-redirect-exeext.test 
b/tests/parallel-tests-fd-redirect-exeext.test
index 0f9d6da..4426604 100755
--- a/tests/parallel-tests-fd-redirect-exeext.test
+++ b/tests/parallel-tests-fd-redirect-exeext.test
@@ -34,7 +34,11 @@ AC_LINK_IFELSE(
     [AC_LANG_PROGRAM([[#include <unistd.h>]],
                      [[write (9, "foobar\n", 7); return 0;]])],
     [AM_RUN_LOG([./conftest$EXEEXT 9>&1]) \
-       && AM_RUN_LOG([(./conftest$EXEEXT 9>&1) | grep "^foobar"]) \
+dnl Leading ":;" required to avoid having two nested subshells starting
+dnl with '((' in the generated configure: that is unportable and could
+dnl confuse some shells (e.g., NetBSD 5.1 /bin/ksh) into thinking we are
+dnl trying to perform an arithmetic operation.
+       && AM_RUN_LOG([:; (./conftest$EXEEXT 9>&1) | grep "^foobar"]) \
        && am__ok=yes])
 test $am__ok = yes || AS_EXIT([63])
 AM_CONDITIONAL([real_EXEEXT], [test -n "$EXEEXT"])
diff --git a/tests/test-driver-is-distributed.test 
b/tests/test-driver-is-distributed.test
index 054c6d9..ffe9d2a 100755
--- a/tests/test-driver-is-distributed.test
+++ b/tests/test-driver-is-distributed.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 2012 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
@@ -18,76 +18,77 @@
 #  - `test-driver' script not correctly distributed when TESTS is
 #    defined in a subdir Makefile
 
+am_create_testdir=empty
 am_parallel_tests=yes
 . ./defs || Exit 1
 
-cat >> configure.in << 'END'
-AC_CONFIG_FILES([tests/Makefile])
-AC_OUTPUT
+ocwd=`pwd` || fatal_ "getting current working directory"
+
+do_check ()
+{
+  whereopts=$1 auxdir=$2
+  case $#,$whereopts in
+    2,ac) ac_opts=parallel-tests am_code= ;;
+    2,am) am_opts=parallel-tests ac_code= ;;
+       *) fatal_ "do_check: bad usage";;
+  esac
+  mkdir $whereopts
+  cd $whereopts
+  mkdir tests
+  unindent > configure.in << END
+    AC_INIT([$me], [1.0])
+    AC_CONFIG_AUX_DIR([$auxdir])
+    AM_INIT_AUTOMAKE([$ac_opts])
+    AC_CONFIG_FILES([Makefile tests/Makefile])
+    AC_OUTPUT
 END
-
-rm -f depcomp # It's unneeded.
-
-mkdir tests
-
-cat > Makefile.am << 'END'
-SUBDIRS = tests
-check-local: test-top
-test-top: distdir
-       ls -l $(distdir) $(distdir)/* ;: For debugging.
-       test -f $(distdir)/test-driver
-.PHONY: test-top
+  if test $auxdir = .; then
+    test_driver=test-driver
+  else
+    mkdir $auxdir
+    test_driver=$auxdir/test-driver
+  fi
+  # No 'AUTOMAKE_OPTIONS' in here -- purposely.
+  unindent > Makefile.am << END
+    SUBDIRS = tests
+    check-local: test-top
+    test-top: distdir
+       ls -l \$(distdir) \$(distdir)/* ;: For debugging.
+       test -f \$(distdir)/$test_driver
+    .PHONY: test-top
 END
-
-cat > tests/Makefile.am << 'END'
-check-local: test-sub
-test-sub:
-       echo ' ' $(DIST_COMMON) ' ' | grep '[ /]test-driver '
-TESTS = foo.test
-EXTRA_DIST = $(TESTS)
+  unindent > tests/Makefile.am << END
+    AUTOMAKE_OPTIONS = $am_opts
+    check-local: test-sub
+    test-sub:
+       echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
+    TESTS = foo.test
+    EXTRA_DIST = \$(TESTS)
 END
-
-cat > tests/foo.test << 'END'
-#!/bin/sh
-exit 0
+  unindent > tests/foo.test << 'END'
+    #!/bin/sh
+    exit 0
 END
-chmod a+x tests/foo.test
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-./configure
-$MAKE test-top
-cd tests; $MAKE test-sub; cd ..;
-$MAKE distcheck
-
-# Try again, with a `config_auxdir' != `.' this time.
-
-$MAKE distclean
-
-mkdir build-aux
-mv missing install-sh test-driver build-aux
-
-for d in . tests; do
-  sed 's|test-driver|build-aux/test-driver|' $d/Makefile.am > $d/t
-  mv -f $d/t $d/Makefile.am
-  cat $d/Makefile.am # For debugging.
-done
-
-# Extra newline possibly required by OpenBSD 3.9 sed, see the autoconf
-# manual for details.
-sed '/^AC_INIT/i\
-AC_CONFIG_AUX_DIR([build-aux])
-' configure.in > t
-mv -f t configure.in
-cat configure.in # For debugging.
-
-touch aclocal.m4 # To avoid useless remakes.
-$AUTOCONF
-$AUTOMAKE
-./configure
-$MAKE test-top
-cd tests; $MAKE test-sub; cd ..;
-$MAKE distcheck
+  chmod a+x tests/foo.test
+  $ACLOCAL
+  $AUTOCONF
+  $AUTOMAKE -a
+  ./configure
+  $MAKE test-top
+  cd tests
+  $MAKE test-sub
+  cd ..
+  $MAKE distcheck
+  # Try code path without automatic installation of required files.
+  mv -f Makefile.in Makefile.sav
+  mv -f tests/Makefile.in tests/Makefile.sav
+  $AUTOMAKE
+  diff Makefile.in Makefile.sav
+  diff tests/Makefile.in tests/Makefile.sav
+  :
+}
+
+do_check ac .
+do_check am build-aux
 
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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