[CMake] Some ctest question

Bill Hoffman bill.hoffman at kitware.com
Tue May 21 14:33:17 EDT 2013


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



More information about the CMake mailing list