Re: Windows Line Endings

2012-10-08 Thread Peter Rosin
Hi Roumen,

On 2012-10-07 11:37, Roumen Petrov wrote:
> And now test fail in cross environment : linux for mingw host

Thanks for the report!

I have pushed this. Let me know if it doesn't help.

>From 0f31e375104b00a181557d3809e556066b3d98b1 Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Mon, 8 Oct 2012 13:10:02 +0200
Subject: [PATCH] tests: rerefix line ending problems on MinGW.

The previous commit broke Linux->MinGW cross-compiling.
Report by Roumen Petrov.

* tests/mdemo.at: Normalize line endings after $EGREP.

Signed-off-by: Peter Rosin 
---
 tests/mdemo.at |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/mdemo.at b/tests/mdemo.at
index 48b7f63..4d70596 100644
--- a/tests/mdemo.at
+++ b/tests/mdemo.at
@@ -824,7 +824,8 @@ int main (int argc, char **argv)
 }
 ]])

-# Not using LT_AT_HOST_DATA below, since $EGREP normalizes line endings.
+# Normalize line endings after $EGREP instead of using LT_AT_HOST_DATA
+# here, since $EGREP *may* normalize line endings for us.
 AT_DATA([expout],
 [[Welcome to GNU libtool mdemo2!
 module name: foo1
@@ -849,9 +850,14 @@ LT_AT_CHECK_CONFIG([--with-included-ltdl])

 LT_AT_MAKE

-LT_AT_EXEC_CHECK([./mdemo2_static], 0, [expout], [],
+LT_AT_EXEC_CHECK([./mdemo2_static], 0, [stdout], [],
 [./foo1.la ./libfoo2.la | $EGREP -v '^module filename: '])
-LT_AT_EXEC_CHECK([./mdemo2], 0, [expout], [],
+LT_AT_UNIFY_NL([stdout])
+LT_AT_CHECK([diff expout stdout])
+
+LT_AT_EXEC_CHECK([./mdemo2], 0, [stdout], [],
 [./foo1.la ./libfoo2.la | $EGREP -v '^module filename: '])
+LT_AT_UNIFY_NL([stdout])
+LT_AT_CHECK([diff expout stdout])

 AT_CLEANUP
--
1.7.9





Re: [PATCH] tests: skip with-pic test when no "real" pic flag is used.

2012-10-08 Thread Peter Rosin
On 2012-10-07 11:59, Roumen Petrov wrote:
> Peter Rosin wrote:
>> On 2012-09-19 23:02, Roumen Petrov wrote:
>>> What about to skip test only if DLL_EXPORT is in pic_flag ?
>> Since the patch has already been pushed and it is only a test
>> that may be skipped on some "other" platforms, I'm going to
>> wait for a bit until someone can confirm if this change has in
>> fact caused skips where the test used to pass.  So, not
>> rushing this one...
> 
> I can not understand why you expect someone to confirm.
> a) how many users use platform with "PIC default" ?
> b) how many users build  with libtool instead that vendor (proprietary) build 
> system ?
> c) how many users test libtool ?
> d) how many users report skipped tests if no one of the tests fail ?
e) how many users run unreleased libtools?

I wasn't *expecting* a *user* to confirm. I was *hoping* a
fellow *developer* could provide feedback.

>> Anyway, the change is simple if needed:
> So push it.

Right. Pushed, with fixed quoting.

Cheers,
Peter



Re: Windows Line Endings

2012-10-08 Thread Roumen Petrov

Peter Rosin wrote:

Hi Roumen,

On 2012-10-07 11:37, Roumen Petrov wrote:

And now test fail in cross environment : linux for mingw host

Thanks for the report!

I have pushed this. Let me know if it doesn't help.


No comment.

Ralf wrote so good code I cannot understand any Peter's  patches.
Why you just don not use existing working fine macros ?



 From 0f31e375104b00a181557d3809e556066b3d98b1 Mon Sep 17 00:00:00 2001
From: Peter Rosin 
Date: Mon, 8 Oct 2012 13:10:02 +0200
Subject: [PATCH] tests: rerefix line ending problems on MinGW.

The previous commit broke Linux->MinGW cross-compiling.
Report by Roumen Petrov.

* tests/mdemo.at: Normalize line endings after $EGREP.

Signed-off-by: Peter Rosin 
---
  tests/mdemo.at |   12 +---
  1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/mdemo.at b/tests/mdemo.at
index 48b7f63..4d70596 100644
--- a/tests/mdemo.at
+++ b/tests/mdemo.at
@@ -824,7 +824,8 @@ int main (int argc, char **argv)
  }
  ]])

-# Not using LT_AT_HOST_DATA below, since $EGREP normalizes line endings.
+# Normalize line endings after $EGREP instead of using LT_AT_HOST_DATA
+# here, since $EGREP *may* normalize line endings for us.
  AT_DATA([expout],
  [[Welcome to GNU libtool mdemo2!
  module name: foo1
@@ -849,9 +850,14 @@ LT_AT_CHECK_CONFIG([--with-included-ltdl])

  LT_AT_MAKE

-LT_AT_EXEC_CHECK([./mdemo2_static], 0, [expout], [],
+LT_AT_EXEC_CHECK([./mdemo2_static], 0, [stdout], [],
  [./foo1.la ./libfoo2.la | $EGREP -v '^module filename: '])
-LT_AT_EXEC_CHECK([./mdemo2], 0, [expout], [],
+LT_AT_UNIFY_NL([stdout])
+LT_AT_CHECK([diff expout stdout])
+
+LT_AT_EXEC_CHECK([./mdemo2], 0, [stdout], [],
  [./foo1.la ./libfoo2.la | $EGREP -v '^module filename: '])
+LT_AT_UNIFY_NL([stdout])
+LT_AT_CHECK([diff expout stdout])

  AT_CLEANUP


Whats going with Ralf ..


Roumen








Re: Windows Line Endings

2012-10-08 Thread Peter Rosin
On 2012-10-08 23:29, Roumen Petrov wrote:
> Peter Rosin wrote:
>> Hi Roumen,
>>
>> On 2012-10-07 11:37, Roumen Petrov wrote:
>>> And now test fail in cross environment : linux for mingw host
>> Thanks for the report!
>>
>> I have pushed this. Let me know if it doesn't help.
> 
> No comment.

Thank you, I'm assuming it finally works for everybody.

> Ralf wrote so good code I cannot understand any Peter's  patches.
> Why you just don not use existing working fine macros ?

Please, make a useful suggestion instead of hand-waving it like
that. What working macros should I use? I also don't see where I'm
introducing any new macros, can you please point that out for me?
And Ralf must write very special code indeed if his code somehow
makes it impossible for some to read the code others write.
[Ralf, if you're reading this, I hope you understand that I don't
think that's true, you write very good code, period]


In this particular case,

LT_AT_HOST_DATA([expout],

doesn't work as it creates \r\n newlines in expout, and $EGREP futzes
the newlines on MSYS so that the standard output ends up \n, causing
the test to blow up.

AT_HOST([expout],

doesn't work as $EGREP leaves the newlines alone for Linux->MinGW
(at least that's what I deduced from your report), and then you
have \n in expout and \r\n in standard output. And the test blows up.

Either that, or I misread your "And now test fail in cross
environment : linux for mingw host" message. I read it as if the
test worked without my patch changing LT_AT_HOST_DATA to AT_HOST,
and that the test failed with the patch. That message made me
assume that neither LT_AT_HOST_DATA nor AT_DATA works for this
test (and the only thing different in this test is that $EGREP
is used).

So, the newlines has to be normalized after the $EGREP, or the
test has to be rewritten in a deeper way.

And, as it happens, Ralf did not write the code I'm changing here,
it was written by Gary when he thankfully eradicated the legacy
testsuite, so I'm not sure why you're dragging Ralf into this?

Cheers,
Peter