[CMake] ctest return code
David Cole
david.cole at kitware.com
Wed Feb 15 15:12:54 EST 2012
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 Deblauwe <tom.deblauwe at traficon.com>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 on linux too.
>
> tdb at PCTDBP /c/werk/cmake_tests
> $ ctest -S dashboard/continuous_**dashboard.cmake -VV
>
> Ctest then runs, and this is the last of the output, in which you can see
> that it builds but that the unittest fails.
>
> .========== Build: 3 succeeded, 0 failed, 2 up-to-date, 0 skipped
> ==========
> Size of output: 1K
> Command exited with the value: 0
> MakeCommand:C:\PROGRA~2\**MI30EB~1\Common7\IDE\devenv.**com<http://devenv.com>Project.sln /build Relea
> se /project ALL_BUILD
> 0 Compiler errors
> 0 Compiler warnings
> SetCTestConfiguration:**BuildDirectory:c:/werk/cmake_**tests/bld-Release
> SetCTestConfiguration:**SourceDirectory:c:/werk/cmake_**tests/prog
> Test project C:/werk/cmake_tests/bld-**Release
> Constructing a list of tests
> Done constructing a list of tests
> Checking test dependency graph...
> Checking test dependency graph end
> test 1
> Start 1: testMylibTest
>
> 1: Test command: C:\werk\cmake_tests\bld-**Release\mylib\test\mylib\**
> release\testMy
> lib.exe
> 1: Test timeout computed to be: 600
> 1/1 Test #1: testMylibTest ....................***Failed 0.05 sec
>
> 0% tests passed, 1 tests failed out of 1
>
> Total Test time (real) = 2.44 sec
>
> The following tests FAILED:
> 1 - testMylibTest (Failed)
>
> Then after ctest exits I do:
> tdb at PCTDBP /c/werk/cmake_tests
> $ echo $?
> 0
>
> As you can see: the test failed, but ctest just returns 0.
>
> Best regards,
> Tom,
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120215/a6443e30/attachment.htm>
More information about the CMake
mailing list