Den 2010-08-31 19:30 skrev Ralf Wildenhues:
> * Peter Rosin wrote on Tue, Aug 31, 2010 at 07:21:34PM CEST:
>> Den 2010-08-31 19:11 skrev Ralf Wildenhues:
>>>   libtool --mode=link $CC ... -o libfoo.a baz.o libbar.a
>>>
>>> should be adding baz.o and all objects in libbar.a to libfoo.a, i.e., it
>>> should extract all objects from libbar.a Instead, libfoo.a is added *as
>>> single member* into libfoo.a.  That's the bug.
>>
>> (assuming typo and that you meant that libbar.a is added *as single member*)
> 
> Yes, sorry.
> 
>> In that case, MS lib does probably not see baz.o when it creates libfoo.a,
>> and the test could be made stricter by checking that baz.o is also part of
>> libfoo.a, since MS lib does the part that is currently tested for
>> (extracting libbar.a and putting the contents in libfoo.a).
> 
> Cool.  Yes, please extend the test.  If MS lib still passes, you can
> adjust the xfail line, something like
> 
>   # This test passes with MS lib.
>   AT_XFAIL_IF([case $AR in ar-lib\ *) false;; *) :;; esac])

It appears that the *as single member* part isn't true. So, after tightening
the test up, it still passes with MS lib. Pushing as attached...

Cheers,
Peter
>From 26dacf3464210910602ce0f679f9770241d7a16e Mon Sep 17 00:00:00 2001
From: Peter Rosin <p...@lysator.liu.se>
Date: Tue, 31 Aug 2010 20:59:11 +0200
Subject: [PATCH] archive-in-archive.at passes with Microsoft lib.

* tests/archive-in-archive.at: Tighten test to check that the desired
object files are indeed part of the archive. Microsoft lib still
passes, so remove the expected failure for that case.

Signed-off-by: Peter Rosin <p...@lysator.liu.se>
---
 ChangeLog                   |    5 +++++
 tests/archive-in-archive.at |    5 ++++-
 2 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 355b485..585356c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-08-31  Peter Rosin  <p...@lysator.liu.se>
 
+       archive-in-archive.at passes with Microsoft lib.
+       * tests/archive-in-archive.at: Tighten test to check that the desired
+       object files are indeed part of the archive. Microsoft lib still
+       passes, so remove the expected failure for that case.
+
        Dump archiver output to the log when testing @file support.
        * libltdl/m4/libtool.m4 (_LT_PROG_AR): Redirect stdout to config.log
        when testing for @file support.
diff --git a/tests/archive-in-archive.at b/tests/archive-in-archive.at
index 32e3543..fd67c7d 100644
--- a/tests/archive-in-archive.at
+++ b/tests/archive-in-archive.at
@@ -26,7 +26,8 @@
 AT_SETUP([static library contains static library])
 AT_KEYWORDS([libtool])
 
-AT_XFAIL_IF([:]) dnl This is currently broken
+# This test passes with MS lib.
+AT_XFAIL_IF([case $AR in ar-lib\ * | *[[/\\]]ar-lib\ *) false;; *) :;; esac])
 
 AT_DATA([foo.c],
 [
@@ -53,4 +54,6 @@ AT_CHECK([$LIBTOOL --mode=install cp libbar.la $thisdir], [], 
[ignore], [ignore]
 eval `$EGREP '^(old_library)=' < libbar.la`
 libbar=$old_library
 AT_CHECK([$AR -t $libbar | grep $libfoo],[1],[ignore],[ignore])
+AT_CHECK([$AR -t $libbar | grep foo.$OBJEXT],[],[ignore],[ignore])
+AT_CHECK([$AR -t $libbar | grep bar.$OBJEXT],[],[ignore],[ignore])
 AT_CLEANUP
-- 
1.7.1

Reply via email to