[CMake] Batch Files in CTest (instead executables)

David Graf david.graf at 28msec.com
Wed Mar 31 09:04:19 EDT 2010


Hello

But this is also not a solution for me. Our testdriver prints some debugging information that can be seen if ctest is executed with the -V option. Therefore, it is impossible to echo SUCCESS or FAILED.

David

On Mar 31, 2010, at 1:23 PM, Michael Wild wrote:

> 
> On 31. Mar, 2010, at 11:47 , David Graf wrote:
> 
>> Hello Michael
>> 
>>> Instead of checking the exit status, you could have CTest check the output for success or failure. Have a look at SET_TESTS_PROPERTIES.
>> 
>> Unfortunately, that doesn't work in our case. We are running a testdriver for the result checking. There reason is: Our tests produce xml and XML cannot be compared like a string. It must be translated into canonical form before it can be compared. We wrote this part in C++. Therefore, we cannot do the comparison in CMake.
>> 
>> David
> 
> What I meant is this to output a string from your batch script:
> 
> SETLOCAL
> SET PATH=...;%PATH%
> execute_something.exe
> IF %ERRORLEVEL% neq 0 ( 
>  ECHO "FAILED"
> ) ELSE (
>  ECHO "SUCCESS"
> )
> ENDLOCAL
> 
> 
> Michael



More information about the CMake mailing list