libtool-patches
[Top][All Lists]
Advanced

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

Re: Unify line endings in localization test


From: Ralf Wildenhues
Subject: Re: Unify line endings in localization test
Date: Mon, 19 Jan 2009 21:35:38 +0100
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Peter,

* Peter Rosin wrote on Sat, Jan 17, 2009 at 12:42:34AM CET:
> In the localization test, the output of the compiler is compared
> with the grepped output of the compiler when run through libtool.
>
> MSVC outputs its messages with \r\n, but the grep in the above
> strips that down to just \n on MSYS. So, when the output is
> diffed, there is a test failure.

Ah.

> Ok to push? Or should I just push it to the pr-msvc-support branch
> for now?

I think we shouldn't be constantly rebasing pr-msvc-support.  I think
instead when we can't decide soonish whether to merge it into master or
to redo it (because it would need largish redoing), then you should just
merge from master into the branch in order to keep it up to date.

> 2009-01-17  Peter Rosin  <address@hidden>
>
>       Unify line endings in localization test.
>       * tests/localization.at: Process both the expected output and
>       the libtool output in the same manner in order to eliminate
>       line ending differences. Fixes the test on MSYS/MSVC.

This looks a bit hackish.  We already have a handful of places which we
fixed up in order to avoid line ending issues.  This one looks hackish
enough to deserve being wrapped in a macro (in testsuite.at, below
LT_AT_HOST_DATA?), so that future instances of this issue can easily be
handled likewise.

> --- a/tests/localization.at
> +++ b/tests/localization.at
> @@ -43,7 +43,7 @@ AT_CHECK([$CC $CPPFLAGS $CFLAGS -c b.c || exit 77], [], 
> [stdout], [stderr])
>  
>  # Find out about expected output.
>  AT_CHECK([$CC $CPPFLAGS $CFLAGS -c a.c || exit 1], [1], [stdout], [stderr])
> -mv -f stdout expected-stdout
> +grep -v thisisprobablynotmatching stdout > expected-stdout
>  mv -f stderr expected-stderr

Why only stdout and not stderr?

>  AT_CHECK([$LIBTOOL --mode=compile --tag=CC $CC $CPPFLAGS $CFLAGS -c a.c || 
> exit 1],
>        [1], [stdout], [stderr])

Thanks,
Ralf




reply via email to

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