[SCM] GNU Libtool branch, master, updated. v2.4.2-278-g5962e9a

2012-10-06 Thread Gary V. Vaughan
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 Libtool.

The branch, master has been updated
   via  5962e9ab32b54d37d5cece3dea56cdd3fcf1f914 (commit)
  from  b505244be8b5160a5564fd3fd1daf16a0038415b (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 5962e9ab32b54d37d5cece3dea56cdd3fcf1f914
Author: Gary V. Vaughan g...@gnu.org
Date:   Sat Oct 6 15:01:52 2012 +0700

tests: sanitise the libtool quote checking Autotests.

Carefully comment the maze of quoting and escaping needed to
pass through M4, $SHELL, and grep before regexp matching.
* tests/libtool.at (quote shell meta-characters in filenames):
Split backslash into a separate test group, because it needs
additional escaping.
Use grep consistently for the entire test group.
Use AT_CHECK rather than LT_AT_CHECK to avoid problems with
escaping literal $ correctly with LT_ESCAPE.
Use the correct number of backslashes for each sub-group.
Escape double-quote literals portably.
Reported by Peter Rosin.

Signed-off-by: Gary V. Vaughan g...@gnu.org

---

Summary of changes:
 tests/libtool.at |   44 +++-
 1 files changed, 31 insertions(+), 13 deletions(-)

diff --git a/tests/libtool.at b/tests/libtool.at
index fafec37..4ab405c 100755
--- a/tests/libtool.at
+++ b/tests/libtool.at
@@ -95,35 +95,53 @@ for mode in compile link install; do
 ;;
   esac
 
-  # Trivial.
-  LT_AT_CHECK([$LIBTOOL -n --mode=$mode $preargs $preflag$flag:test 
$postargs],
+
+  # Trivial...
+
+  AT_CHECK([$LIBTOOL -n --mode=$mode $preargs $preflag$flag:test $postargs],
   [0], [stdout])
   # We must not attempt to match $preargs in the output, because libtool
   # may modify them.  For example, on Cygwin, ``libtool --mode=link gcc -o
   # foo foo.o''  becomes ``gcc -o foo.exe foo.o''.
-  LT_AT_CHECK([$EGREP $mode:.*$match_preflag$flag:test  stdout], [0], 
[ignore])
+  AT_CHECK([grep $mode:.*$match_preflag$flag:test  stdout], [0], [ignore])
+
 
-  # Metacharacters that should be backslashified.
-  for mchar in \ \` \$ \\; do
-LT_AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag$flag$mchar:test$mchar $postargs],
+  # Non-trivial...
+
+  # Backslash needs to be double-escaped: one escape is stripped as the shell
+  # collects arguments for grep ( = ), and then another escape
+  # is stripped by grep itself ( = \\) before the resulting expression is
+  # matched (grepping for \\ matches \):
+  AT_CHECK([$LIBTOOL -n --mode=$mode $preargs $preflag$flag\\:test\\ 
$postargs],
+  [0], [stdout])
+  # NOTE: we use ...''... to insert a literal quote into the expression
+  #   because ...\... is not expanded consistently by all shells.
+  AT_CHECK([grep $mode:.*$match_preflag'\?'$flag:test'\? 
' stdout],
+ [0], [ignore])
+
+  # Shell metacharacters that should be backslashified by libtool.
+  for mchar in \ \` \$; do
+AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag$flag$mchar:test$mchar $postargs],
 [0], [stdout])
-LT_AT_CHECK([$EGREP 
$mode:.*$match_preflag\?$flag\\$mchar:test\\$mchar\?  stdout], [0], 
[ignore])
+AT_CHECK([grep 
$mode:.*$match_preflag''\?$flag$mchar:test$mchar''\?  stdout], 
[0], [ignore])
   done
 
-  # Metacharacters that should be double quoted, and need escaping for grep
+  # Shell metacharacters that should be double quoted by libtool, and need
+  # backslash escaping for input to grep.
   for mchar in @:@ @:@ ^ *; do
 
-LT_AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag$flag$mchar:test$mchar $postargs],
+AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag$flag$mchar:test$mchar $postargs],
 [0], [stdout])
-LT_AT_CHECK([grep $mode:.*$match_preflag\$flag\\$mchar:test\\$mchar\  
stdout], [0], [ignore])
+AT_CHECK([grep $mode:.*$match_preflag\$flag\\$mchar:test\\$mchar\  
stdout], [0], [ignore])
   done
 
-  # Metacharacters that should be double quoted, that are not special to grep.
+  # Metacharacters that should be double quoted by libtool, but which are
+  # not special to grep (NOTE: Some of these ARE special to $EGREP!!).
   for mchar in ~ #  ( ) { } | ;   ? '  
; do
 
-LT_AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag$flag$mchar:test$mchar $postargs],
+AT_CHECK([$LIBTOOL -n --mode=$mode $preargs 
$preflag$flag$mchar:test$mchar $postargs],
 [0], [stdout])
-LT_AT_CHECK([grep $mode:.*$match_preflag\$flag$mchar:test$mchar\  
stdout], [0], [ignore])
+AT_CHECK([grep $mode:.*$match_preflag\$flag$mchar:test$mchar\  

[SCM] GNU Libtool branch, master, updated. v2.4.2-280-gb78fd97

2012-10-06 Thread Peter Rosin
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 Libtool.

The branch, master has been updated
   via  b78fd9740ef6a2ed67a1ef14e76483af784fb5f0 (commit)
   via  82791b3fb7043f81391bb36047f8533f4dd11b7b (commit)
  from  5962e9ab32b54d37d5cece3dea56cdd3fcf1f914 (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 b78fd9740ef6a2ed67a1ef14e76483af784fb5f0
Author: Peter Rosin p...@lysator.liu.se
Date:   Sun Oct 7 00:57:26 2012 +0200

tests: refix line ending problems on MinGW.

In commit 22f5750, one of the hunks actually introduced
line ending problems. Revert that hunk.

* tests/mdemo.at: Use AT_DATA for expected output when the
output from compiled programs is fed through $EGREP.

Signed-off-by: Peter Rosin p...@lysator.liu.se

commit 82791b3fb7043f81391bb36047f8533f4dd11b7b
Author: Peter Rosin p...@lysator.liu.se
Date:   Sun Oct 7 00:57:10 2012 +0200

tests: use dry runs in both parts of 'check link mode operation'

MSVC exits with status 2 instead of the expected 1 when a
real link is attempted.

* tests/libtool.at (check link mode operation): Use a dry run and
expect a clean exit status instead of expecting a fail.

Signed-off-by: Peter Rosin p...@lysator.liu.se

---

Summary of changes:
 tests/libtool.at |2 +-
 tests/mdemo.at   |3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/libtool.at b/tests/libtool.at
index 4ab405c..3bcdfe5 100755
--- a/tests/libtool.at
+++ b/tests/libtool.at
@@ -192,7 +192,7 @@ pic_object=none
 non_pic_object=hell.o
 ]])
 
-AT_CHECK([$LIBTOOL --mode=link $CC -o something foo.o hell.lo], [1], [stdout], 
[ignore])
+AT_CHECK([$LIBTOOL -n --mode=link $CC -o something foo.o hell.lo], [0], 
[stdout], [ignore])
 AT_CHECK([$FGREP '.lo ' stdout], [1], [ignore])
 
 AT_CLEANUP
diff --git a/tests/mdemo.at b/tests/mdemo.at
index 70c5532..48b7f63 100644
--- a/tests/mdemo.at
+++ b/tests/mdemo.at
@@ -824,7 +824,8 @@ int main (int argc, char **argv)
 }
 ]])
 
-LT_AT_HOST_DATA([expout],
+# Not using LT_AT_HOST_DATA below, since $EGREP normalizes line endings.
+AT_DATA([expout],
 [[Welcome to GNU libtool mdemo2!
 module name: foo1
 module reference count: 1


hooks/post-receive
-- 
GNU Libtool