[CMake] ctest return code
Tom Deblauwe
tom.deblauwe at traficon.com
Wed Feb 15 14:44:47 EST 2012
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 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 --------------
A non-text attachment was scrubbed...
Name: cmake_tests.zip
Type: application/octet-stream
Size: 5265 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120215/7b72f257/attachment-0001.obj>
More information about the CMake
mailing list