<div dir="ltr"><div>Yeah, you are right. If ctest itself fails it should return non-zero.<br><br></div><div>We use qtestlib [1] from Qt5 and add every testsuite with ADD_TEST and dump a logfile that will be parsed by xunit plugin [2] of jenkins.<br><br>ADD_TEST(${TESTNAME} ${TESTNAME} -platform offscreen -v2 -o ${CMAKE_CURRENT_BINARY_DIR}/results.${TESTNAME}.log.xml,xml)<br><br></div><div>The problem is that the test binaries of qtestlib will return non-zero if some testcase is broken. So ctest will also return non-zero because a testsuite "failed".<br></div><div>Of course, this is the correct behaviour if something goes wrong. But if ctest returns non-zero, jenkins will abort the whole build instead of let xunit plugin mark the build as "unstable" because testcase XY failed.<br></div><div><br></div><div>Best regards<br></div><div>   André<br><br></div><div><br>[1] <a href="http://doc.qt.io/qt-5/qtest-overview.html">http://doc.qt.io/qt-5/qtest-overview.html</a><br>[2] <a href="https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin">https://wiki.jenkins-ci.org/display/JENKINS/xUnit+Plugin</a><br><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-08-14 16:01 GMT+02:00 Brad King <span dir="ltr"><<a href="mailto:brad.king@kitware.com" target="_blank">brad.king@kitware.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 08/13/2015 04:09 PM, A. Klitzing wrote:<br>
> We use ctest on Jenkins in a shell build step. Jenkins will FAIL<br>
> the build if the last command (ctest) will return a non-zero<br>
> return code even the configured UNSTABLE/FAIL threshold is not<br>
> reached.<br>
><br>
</span><span class="">> This won't be necessary if ctest could ignore the return codes.<br>
<br>
</span>If something goes wrong with the administration of running the<br>
dashboard client, like "git fetch" fails, then CTest should report<br>
failure via a non-zero return code.  Some cleanup of this was done<br>
recently to tolerate failed tests and such without making the process<br>
exit code non-zero.  If you've found remaining cases where normal<br>
testing failures produce a non-zero exit from ctest then we should<br>
fix those first.<br>
<br>
Can you explain your case in more detail, please?<br>
<br>
Thanks,<br>
-Brad<br>
<br>
</blockquote></div><br></div>