[CMake] ctest ques.: capture driver errs
David Cole
david.cole at kitware.com
Wed Sep 20 07:28:24 EDT 2006
The output that goes to the console during a ctest driven execution of
your test will show up amidst the ctest output if you use "-V" when
invoking ctest.
And even if you don't use -V, ctest puts the console output from tests
like this into "${CMAKE_BINARY_DIR}/Testing/Temporary/LastTest*.log"
where you can find it later if you need to.
HTH,
David
Dean Inglis wrote:
>I have a build similar to VTK/Examples/Build/vtkMy
>and I have added ctest funtionality to test my custom
>VTK classes. In a test driver that evaluates numeric
>expressions, e.g. a stupid ex.:
>
>in myTest(int,char*[])
>{
> int a =1;
> int b = 2;
> int retVal = 0;
> if((a + b) != 500)
> {
> vtkGenericWarningMacro(<<"err: a + b != 500, a = " << a<<", b = " << b);
> retVal = 1;
> }
> return retVal;
>}
>
>I want to retrieve some form of diagnostic message either at console
>or to a log file. Is there a way to do this with cmake/ctest or do
>I have to explicitly write out my error diagnostics to a file?
>Replacing vtkGenericWarningMacro( with cout does not pipe output
>to the console: ctest prevents this.
>
>Dean
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake
>
>
>
More information about the CMake
mailing list