[CMake] Some ctest question

Thompson, K T kgt at lanl.gov
Tue May 21 14:39:44 EDT 2013


Jim,

You might consider using numdiff (http://www.nongnu.org/numdiff/).  We use this tool to compare test output to a gold standard file where the output has mixed text and floating point values.

-kt

> -----Original Message-----
> From: cmake-bounces at cmake.org [mailto:cmake-bounces at cmake.org] On Behalf Of
> Bill Hoffman
> Sent: Tuesday, May 21, 2013 12:33 PM
> To: cmake at cmake.org
> Subject: Re: [CMake] Some ctest question
> 
> On 5/19/2013 4:46 PM, Leek, Jim wrote:
> > Unfortunately, I don't think that's powerful enough.  The test
> > results consist of about 100 lines of floating point numbers mixed in
> > with text.  I would like to make sure that all of those floating
> > point numbers are "correct" (Within 1% would probably be close
> > enough.)  Unfortunately, since this is the first time this code has
> > ever had automated testing, it doesn't have an output format that
> > makes it easy to see the numbers without parsing out the text.  So
> > for now I'm just using diff to check everything.  I don't think a 1
> > line regular expression could allow me to check every floating point
> > in the file for correctness...
> 
> Would I would do is create a diff program that gets compiled during the
> build and then use that to do the check.  I assume if it floating point
> stuff you will want to do some sort of fuzzy equal based on the expected
> range of the data.  If you test your code on more than one platform that
> will be required to get the test to pass.  For VTK and ITK we use image
> difference programs that check valid images with test images.
> 
> -Bill
> 
> --
> 
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list