[CMake] CxxTest failure output running unit tests

Tron Thomas tron.thomas at verizon.net
Mon Dec 8 23:52:54 EST 2008


Philip Lowman wrote:
> ...... Original Message .......
> On Mon, 08 Dec 2008 10:50:28 -0500 "Bill Hoffman" 
> <bill.hoffman at kitware.com> wrote:
>   
>>
>> I still think it looks ugly and hard to see the tests that failed.....
>>     
>
> Not all testing suites are going to be as verbose as CxxTest.  It's also not going to be any 
> easier on the eyes in the verbose logfile than it is on stdout.  In fact I would argue it's far 
> more readable on stdout because with the verbose option there is a lot more logging.
>
> Furthermore, the possibility remains that CxxTest  may be able to be 
> customized to simplify the output when running within another testing 
> system.
>
>   
>> Does the  Testing/Temporary/LastTest.log file help at all?   So, if you 
>> run tests and there are failures, you can look at that file to see the 
>> detail.  Maybe if ctest did something like this:
>> The following tests FAILED:
>>        2 - unittest_addition_fail (Failed)
>> (See Testing/Temporary/LastTest.log for details.)
>>     
>
> LastTest.log is a nice thing to have but if the user has 800 unit tests I 
> think he'd prefer not to look through the entire logfile.
>
> How about giving the user the command to run to get information for the 
> tests that failed?
>
> (Run "ctest --output-on-failure -N 2,5,9-11" for details about the failed 
> tests.) 
>
> Obviously -N would also need to be implemented for this to work right (-I 
> is kinda bloated and doesn't support multiple ranges)
Another benefit is for producing errors in the build output is that some 
IDE's can be configured such that when someone clicks on the error it 
will take them directly to the code that caused the error so that 
someone can try to figure out what went wrong.


More information about the CMake mailing list