[CMake] Batch Files in CTest (instead executables)

Michael Wild themiwi at gmail.com
Wed Mar 31 07:23:19 EDT 2010


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