[libav-devel] [PATCH] fate: Make oneline comparison ignore CR

Måns Rullgård mans at mansr.com
Tue May 8 02:04:25 CEST 2012


Alex Converse <alex.converse at gmail.com> writes:

> On Mon, May 7, 2012 at 4:32 PM, Måns Rullgård <mans at mansr.com> wrote:
>> Alex Converse <alex.converse at gmail.com> writes:
>>
>>> ---
>>>  tests/fate-run.sh |    2 +-
>>>  1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/tests/fate-run.sh b/tests/fate-run.sh
>>> index a45e9a9..2522a21 100755
>>> --- a/tests/fate-run.sh
>>> +++ b/tests/fate-run.sh
>>> @@ -61,7 +61,7 @@ stddev(){
>>>  }
>>>
>>>  oneline(){
>>> -    val=$(cat "$2")
>>> +    val=$(cat "$2" | tr -d '\r')
>>>      test x"$val" = x"$1" || { r=$?; printf -- '-%s\n+%s\n' "$ref" "$val"; }
>>>      return ${r:-0}
>>>  }
>>> --
>>> 1.7.7.3
>>>
>>> Fixes tests on mingw-w64. Feel free to suggest other approaches.
>>
>> Fix mingw.  This is not a compliant shell.
>>
>
> The code doesn't run on a MinGW shell, fate-run.sh runs on dash on
> Linux, avprobe runs under wine.

Then fix the test environment to be conforming.

BTW, I don't think testing under wine is a good idea.  What works under
wine is not guaranteed to work on a real Windows system.

>> Our policy is to not work around OS bugs in ugly ways.
>
> I don't think this ideological purity does our users any good.

It keeps us sane, and that is good for the users in the long term.

-- 
Måns Rullgård
mans at mansr.com


More information about the libav-devel mailing list