[vtk-developers] Comparing ascii files with kwsys::FilesDiffer

Bill Lorensen bill.lorensen at gmail.com
Fri Feb 8 16:08:02 EST 2013


Well, since I don't have control over that, I'll probably just write a
few lines of code to compare the ascii files.
Afterall, we are supposed to get snowed in this weekend.

Bill

On Fri, Feb 8, 2013 at 4:01 PM, David Cole <dlrdave at aol.com> wrote:
> We don't.
>
> Somebody with access to the machines in question should verify and fix, if
> possible, without any code changes.
>
>
>
> -----Original Message-----
> From: Bill Lorensen <bill.lorensen at gmail.com>
> To: David Cole <dlrdave at aol.com>
> Cc: brad.king <brad.king at kitware.com>; vtk-developers
> <vtk-developers at vtk.org>
> Sent: Fri, Feb 8, 2013 3:57 pm
> Subject: Re: [vtk-developers] Comparing ascii files with kwsys::FilesDiffer
>
> Dave,
>
> How do we fix that? I don't have access to those machines.
>
> Bill
>
> On Fri, Feb 8, 2013 at 3:35 PM, David Cole <dlrdave at aol.com> wrote:
>> Before writing a bunch of code.... verify that the git auto-convert
>> setting
>> for pulling files into the working tree is the same for both VTK and
>> VTKData
>> on the machines in question.
>>
>> Looks like the VTKData file is the one missing the CRs (has fewer bytes)
>> --
>> makes me think the git setting is wrong for the VTKData checkout.
>>
>>
>>
>> -----Original Message-----
>> From: Brad King <brad.king at kitware.com>
>> To: Bill Lorensen <bill.lorensen at gmail.com>
>> Cc: VTK Developers <vtk-developers at vtk.org>
>> Sent: Fri, Feb 8, 2013 3:31 pm
>> Subject: Re: [vtk-developers] Comparing ascii files with
>> kwsys::FilesDiffer
>>
>> On 02/08/2013 03:26 PM, Bill Lorensen wrote:
>>> The test compares two ASCII files. The difference is because (some,
>>> but not all) windows systems handle newline differently than linux and
>>> mac os.
>>
>> The SystemTools::FilesDiffer method was originally added for CMake's
>> configure_file command to decide whether to replace a file with a new
>> version or to not replace it because the configured result is the same.
>> In this use case both files are produced the same way so newlines match.
>> That's why we haven't covered this before.
>>
>>> In the link you can see that the contents of the two files "look" the
>>> same, but the lengths of the two files is different and
>>> vtksys::FilesDiffer reports they are different. That's because some
>>> windows systems use a CR/LF character for newline while the linux
>>> systems use LF.
>>>
>>> How to solve this? I could add a FileDiff program to the test that
>>> uses getline to compare the two files.
>>
>> We don't use FilesDiffer to compare test images to baselines because
>> there can be pixel-fuzz differences and such.  Text file comparison
>> may have various tolerances other than just newlines and we will not
>> be able to cover them all in FilesDiffer.  Therefore I think VTK
>> should have its own comparison tool for text files just like it does
>> for images.
>>
>> -Brad
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
>> http://www.kitware.com/opensource/opensource.html
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.vtk.org/mailman/listinfo/vtk-developers
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the vtk-developers mailing list