automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-382-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-382-g5cfe77c
Date: Thu, 16 Jun 2011 08:32:45 +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=5cfe77c655c8c9a82c1cc1686c5da4c9cdd05c45

The branch, maint has been updated
       via  5cfe77c655c8c9a82c1cc1686c5da4c9cdd05c45 (commit)
       via  ed078daae2110f79322c79826be567645ef62ea4 (commit)
      from  fefc6a0618c9cdace8b9aa97e1404b0a56abf7dc (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 5cfe77c655c8c9a82c1cc1686c5da4c9cdd05c45
Merge: fefc6a0 ed078da
Author: Stefano Lattarini <address@hidden>
Date:   Thu Jun 16 10:29:32 2011 +0200

    Merge branch 'more-prefix-primary-diagnostic' into maint

commit ed078daae2110f79322c79826be567645ef62ea4
Author: Stefano Lattarini <address@hidden>
Date:   Mon Jun 13 10:51:57 2011 +0200

    tests: optimize tests on primary/prefix mismatch for speed
    
    * tests/primary-prefix-invalid-couples.test: Partial rewrite, in
    order to use just a single automake invocation rather than one
    invocation for each invalid primary/prefix couple.  This improves
    the test script execution time by an order of magnitude.
    Since we are at it, throw in some other improvements to avoid
    unrelated automake warnings and failures that could potentially
    cause false positives w.r.t. the automake exit status.

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

Summary of changes:
 ChangeLog                                 |   11 ++++
 tests/primary-prefix-invalid-couples.test |   73 +++++++++++++++++++++++------
 2 files changed, 70 insertions(+), 14 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 77a7b6b..bfe9771 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2011-06-13  Stefano Lattarini  <address@hidden>
 
+       tests: optimize tests on primary/prefix mismatch for speed
+       * tests/primary-prefix-invalid-couples.test: Partial rewrite, in
+       order to use just a single automake invocation rather than one
+       invocation for each invalid primary/prefix couple.  This improves
+       the test script execution time by an order of magnitude.
+       Since we are at it, throw in some other improvements to avoid
+       unrelated automake warnings and failures that could potentially
+       cause false positives w.r.t. the automake exit status.
+
+2011-06-13  Stefano Lattarini  <address@hidden>
+
        news: update w.r.t. introduction of AM_DISTCHECK_CONFIGURE_FLAGS
        * NEWS (Miscellaneous changes): Update.
 
diff --git a/tests/primary-prefix-invalid-couples.test 
b/tests/primary-prefix-invalid-couples.test
index e80b4c2..88e0817 100755
--- a/tests/primary-prefix-invalid-couples.test
+++ b/tests/primary-prefix-invalid-couples.test
@@ -26,10 +26,17 @@ set -e
 
 oIFS=$IFS # Saved for later.
 
+: > ltmain.sh
+: > texinfo.tex
+: > elisp-comp
+: > py-compile
+: > config.guess
+: > config.sub
+
 cat >> configure.in <<'END'
 AC_PROG_CC
 AC_PROG_RANLIB
-AC_PROG_LIBTOOL
+AC_SUBST([LIBTOOL], [:]) dnl So that we don't have to require Libtool.
 AM_PROG_GCJ
 AM_PATH_PYTHON
 AM_PATH_LISPDIR
@@ -58,7 +65,7 @@ set +x # Don't be overly verbose.
 
 for prefix in $prefixes; do
   for primary in $primaries; do
-    echo ${prefix}_${primary}
+    echo ${prefix} ${primary}
   done
 done >all.list
 
@@ -120,23 +127,61 @@ for primary in $primaries; do
   done
 done >allow.list
 
-set -x # Restore shell xtraces from now on.
+# `html_TEXINFOS' is not yet supported, and might never be.
+grep -v '^html TEXINFOS$' all.list | awk '{print NR, $0}' > t
+mv -f t all.list
 
+# For debugging.
+echo '=== all.list ==='
 cat all.list
+echo '=== allow.list ==='
 cat allow.list
 
-while read x; do
-  grep "^$x$" allow.list >/dev/null && continue
-  # To get the expected error message more in detail.
-  IFS=_; set $x; IFS=$oIFS
-  test $# -eq 2 || fatal_ "internal error in 'all.list'" # Sanity check.
-  prefix=$1
-  primary=$2
+# Create the Makefile.am.
+while read lineno prefix primary; do
+  test -n "$prefix" && test -n "$primary" && test 0 -lt $lineno \
+    || fatal_ "internal error in 'all.list'"
+  pfx='' ext=''
+  case $primary in
+    LTLIBRARIES) pfx=lib ext=la;;
+    LIBRARIES) pfx=lib ext=a;;
+    MANS) ext=man;;
+    HEADERS) ext=h;;
+    JAVA) ext=java;;
+    PYTHON) ext=py;;
+    LISP) ext=el;;
+    TEXINFOS) ext=texi;;
+  esac
+  test -z "$ext" || ext=.$ext
+  if test $primary = TEXINFOS; then
+    echo @setfilename foo$lineno.info > foo$lineno.texi
+  fi
+  echo ${prefix}_${primary} = ${pfx}foo${lineno}${ext}
+done <all.list >Makefile.am
+
+# For debugging.
+echo '=== Makefile.am ==='
+cat Makefile.am
+
+set -x # Restore shell xtraces from now on.
+
+AUTOMAKE_fails -a
+
+while read lineno prefix primary; do
+  test -n "$prefix" && test -n "$primary" && test 0 -lt $lineno \
+    || fatal_ "internal error in 'all.list'"
+  grep "^${prefix}_${primary}$" allow.list >/dev/null && continue
   errmsg_rx=".*${prefix}dir.* not a legitimate directory .*$primary"
-  # Now do the test for this prefix/primary combination.
-  echo "$x = foo" > Makefile.am
-  AUTOMAKE_fails -a || Exit 1
-  grep "^Makefile\\.am:1:$errmsg_rx" stderr || Exit 1
+  grep "^Makefile\\.am:$lineno: $errmsg_rx" stderr || Exit 1
 done <all.list
 
+# Check that automake really failed only for the expected reason(s).
+grep -v 'dir.* not a legitimate directory' stderr && Exit 1
+
+# Check that the same failures are present without the `--add-missing'
+# option.
+mv stderr stderr.old
+AUTOMAKE_fails
+diff stderr.old stderr
+
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

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