[CMake] testing with standard output

Henrique Almeida hdante at gmail.com
Tue Jul 14 08:48:53 EDT 2009


 Hello,

 When running "make test", some of my unit tests require that the
result is given by a correct output, instead of (just) the correct
return value (because, I'm specifically testing the ability to do
output). Is there a way to configure CTest to report a successful
result for certain tests by comparing their outputs to a reference
output ?

 In the most general case I'd need something like:

 add_test(test source1 source2 INPUT test.input EXPECTED_OUTPUT
test.output EXPECTED_ERROR test.error)

 I'd provide test.input as stdin, test.output as expected stdout and
test.error as expected stderr.

-- 
 Henrique Dante de Almeida
 hdante at gmail.com


More information about the CMake mailing list