[CMake] Some ctest question

Leek, Jim leek2 at llnl.gov
Sun May 19 16:46:17 EDT 2013


>> 3.      Finally, my testing script uses "diff" to compare the output from
>> the test to the canonical output.  This works fine on various unix 
>> flavors, but I will also need to build this on Windows (probably with mingw).
>> Windows doesn't have diff, but does have FC.  I could probably write a 
>> windows script to do testing.  How are these problems usually handled?
>> CMAKE_SYSTEM_NAME?

>set_tests_properties(... PASS_REGULAR_EXPRESSION)?

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...
 
Thanks,
Jim


More information about the CMake mailing list