[CMake] ctest return code

2012-02-15 Thread Tom Deblauwe
Hello, I'm able to run my unittests and build everything using a ctest -S script, and also submit the results to cdash. However, I would like to determine if the unittests fail in the bash script where I run ctest in. But it doesn't return an error code when the unittests fail. How can I

Re: [CMake] ctest return code

2012-02-15 Thread David Cole
Are you using ctest_build and ctest_test in your -S script? If so, then ctest should fail with a non-zero result when there are build errors or test failures. Are you saying that you have test failures, but ctest returns 0? Can you share your script, or reproduce this with a minimal example

Re: [CMake] ctest return code

2012-02-15 Thread Bill Hoffman
On 2/15/2012 2:44 PM, Tom Deblauwe wrote: Hello, In attachment a project which illustrates the problem. Just change the directory in the ctest script continuous_dashboard.cmake to where your source is. Then i run ctest in my bash script. I'm in git bash on windows now, but I get the problem

Re: [CMake] ctest return code

2012-02-15 Thread David Cole
Is this just a git bash shell thing, then...? Do you get zero if you run it in a Windows cmd prompt, too? What does this give you? Start Run cmd C: cd \werk\cmake_tests ctest -S dashboard/continuous_**dashboard.cmake -VV echo %ERRORLEVEL% On Wed, Feb 15, 2012 at 2:44 PM, Tom

Re: [CMake] ctest return code

2012-02-15 Thread Tom Deblauwe
Hello, It is apparently a combination of the two things, first I had to check the RETURN_VALUE of the ctest_test command and then issue a fatal_error when not zero. Secondly: This works if I test it like you suggest in a command window: the %errorlevel% is set. However in the git bash shell

Re: [CMake] ctest return code

2012-02-15 Thread Bill Hoffman
On 2/15/2012 3:57 PM, Tom Deblauwe wrote: It is apparently a combination of the two things, first I had to check the RETURN_VALUE of the ctest_test command and then issue a fatal_error when not zero. Secondly: This works if I test it like you suggest in a command window: the %errorlevel% is