<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
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. <br>
Secondly: This works if I test it like you suggest in a command
window: the %errorlevel% is set. However in the "git bash" shell
thingy on windows, I always get 0. I tried it now in linux too, and
there the "echo $?" is working and is showing me the error code
instead of 0.<br>
<br>
So thanks to both for the suggestions!<br>
Best regards,<br>
Tom, <br>
<br>
Op 15/02/2012 21:12, David Cole schreef:
<blockquote
cite="mid:CAAdwe9XSGd9K4c23rk8xoP-rF75iHGqkwzjz-8a6dRZjF8v1Pw@mail.gmail.com"
type="cite">Is this just a "git bash" shell thing, then...?
<div><br>
</div>
<div>Do you get zero if you run it in a Windows cmd prompt, too?</div>
<div><br>
</div>
<div>What does this give you?</div>
<div><br>
</div>
<div> Start > Run > cmd</div>
<div> C:</div>
<div> cd \<span class="Apple-style-span"
style="border-collapse:collapse;color:rgb(34,34,34);font-family:arial,sans-serif;font-size:13px">werk\cmake_tests</span><br>
ctest -S dashboard/continuous_dashboard.cmake -VV</div>
<div> echo %ERRORLEVEL%</div>
<div><br>
</div>
<div><br>
<div class="gmail_quote">On Wed, Feb 15, 2012 at 2:44 PM, Tom
Deblauwe <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:tom.deblauwe@traficon.com">tom.deblauwe@traficon.com</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
In attachment a project which illustrates the problem.<br>
<br>
Just change the directory in the ctest script
"continuous_dashboard.cmake" to where your source is.<br>
<br>
Then i run ctest in my bash script. I'm in git bash on
windows now, but I get the problem on linux too.<br>
<br>
tdb@PCTDBP /c/werk/cmake_tests<br>
$ ctest -S dashboard/continuous_dashboard.cmake -VV<br>
<br>
Ctest then runs, and this is the last of the output, in
which you can see that it builds but that the unittest
fails.<br>
<br>
.========== Build: 3 succeeded, 0 failed, 2 up-to-date, 0
skipped ==========<br>
Size of output: 1K<br>
Command exited with the value: 0<br>
MakeCommand:C:\PROGRA~2\MI30EB~1\Common7\IDE\<a
moz-do-not-send="true" href="http://devenv.com"
target="_blank">devenv.com</a> Project.sln /build Relea<br>
se /project ALL_BUILD<br>
0 Compiler errors<br>
0 Compiler warnings<br>
SetCTestConfiguration:BuildDirectory:c:/werk/cmake_tests/bld-Release<br>
SetCTestConfiguration:SourceDirectory:c:/werk/cmake_tests/prog<br>
Test project C:/werk/cmake_tests/bld-Release<br>
Constructing a list of tests<br>
Done constructing a list of tests<br>
Checking test dependency graph...<br>
Checking test dependency graph end<br>
test 1<br>
Start 1: testMylibTest<br>
<br>
1: Test command: C:\werk\cmake_tests\bld-Release\mylib\test\mylib\release\testMy<br>
lib.exe<br>
1: Test timeout computed to be: 600<br>
1/1 Test #1: testMylibTest ....................***Failed
0.05 sec<br>
<br>
0% tests passed, 1 tests failed out of 1<br>
<br>
Total Test time (real) = 2.44 sec<br>
<br>
The following tests FAILED:<br>
1 - testMylibTest (Failed)<br>
<br>
Then after ctest exits I do:<br>
tdb@PCTDBP /c/werk/cmake_tests<br>
$ echo $?<br>
0<br>
<br>
As you can see: the test failed, but ctest just returns 0.<br>
<br>
Best regards,<br>
Tom,<br>
<br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<b>Tom Deblauwe</b><br>
<b>R&D Engineer</b><br>
<br>
Traficon International N.V.<br>
Vlamingstraat 19<br>
B-8560 Wevelgem<br>
Belgium<br>
Tel.: +32 (0)56 37.22.00<br>
Fax: +32 (0)56 37.21.96<br>
URL: <a href="http://www.traficon.com">www.traficon.com</a><br>
</div>
</body>
</html>