The return value of ctest after it runs a -S script indicates whether the script as a whole succeeded or not. The only way it succeeds all the way and returns 0 is if *all* of the steps invoked are error free.<div><br></div>
<div>The build errors mean that ctest's return value will be non-zero. (Same for update, configure or test errors as well...)</div><div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br></div><div><br><br>
<div class="gmail_quote">On Mon, Oct 19, 2009 at 1:22 PM, <span dir="ltr"><<a href="mailto:winfried_mb2@xmsnet.nl">winfried_mb2@xmsnet.nl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
The ctest script below runs fine when the build succeeds. However if the CTEST_BUILD(...) step fails, I don't call the CTEST_TEST(...) step since that is useless.<br>
<br>
In this case the ctest output ends with:<br>
Error in read script: <ctest_scriptname here><br>
<br>
and the exit code of ctest is 255 in this case.<br>
The configure and build results are correctly uploaded to the CDash server, so basically the script works o.k. Then why does it give this error?<br>
<br>
I'm using cmake 2.8.0-rc3<br>
<br>
Thanks in advance for any clues!<br>
Arthur Dobbe<br>
<br>
<br>
set (CTEST_SOURCE_DIRECTORY "/var/opt/buildtools/release/VEHICLES_2_1_0/CAR_2_1/export")<br>
set (CTEST_BINARY_DIRECTORY "/var/opt/buildtools/release/VEHICLES_2_1_0/CAR_2_1/build.Release" )<br>
set(CTEST_PROJECT_NAME "VEHICLES_2_1_0")<br>
set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")<br>
set(CTEST_DROP_METHOD "http")<br>
set(CTEST_DROP_SITE "localhost")<br>
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=VEHICLES_2_1_0")<br>
set(CTEST_DROP_SITE_CDASH TRUE)<br>
SET(CTEST_CMAKE_GENERATOR "Unix Makefiles")<br>
SET(CTEST_BUILD_COMMAND make)<br>
file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "<br>
SITE:STRING=${hostname}<br>
CMAKE_BUILD_TYPE:STRING=Release<br>
PRODUCT_DIR:STRING=/var/opt/buildtools/release/VEHICLES_2_1_0<br>
")<br>
set(CTEST_SITE "localhost")<br>
set_property(GLOBAL PROPERTY SubProject "CAR_2_1")<br>
set_property(GLOBAL PROPERTY Label "CAR_2_1")<br>
set (CTEST_BUILD_TARGET "CAR_2_1")<br>
CTEST_START("Experimental")<br>
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE configRes)<br>
if (${configRes} EQUAL 0)<br>
CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE buildRes)<br>
endif (${configRes} EQUAL 0)<br>
if (${buildRes} EQUAL 0)<br>
execute_process(COMMAND "/usr/bin/make" "install" WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} RESULT_VARIABLE makeInstallResult OUTPUT_VARIABLE makeInstallLog ERROR_VARIABLE makeInstallLog)<br>
file(WRITE ${CTEST_BINARY_DIRECTORY}/makeinstall.log "${makeInstallLog}")<br>
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")<br>
endif (${buildRes} EQUAL 0)<br>
CTEST_SUBMIT(FILES "/var/opt/buildtools/release/VEHICLES_2_1_0/Project.xml")<br>
CTEST_SUBMIT()<br>
<br>
<br>
Output of ctest when build fails:<br>
# ctest -S bt_ctest.cmake<br>
Error(s) when building project<br>
Error in read script: /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/build.Release/bt_ctest.cmake<br>
<br>
<br>
Verbose output of ctest when build fails:<br>
# ctest -S bt_ctest.cmake -V<br>
Run dashboard with model Experimental<br>
Source directory: /var/opt/buildtools/release/VEHICLES_2_1_0/CAR_2_1/export<br>
Build directory: /var/opt/buildtools/release/VEHICLES_2_1_0/CAR_2_1/build.Release<br>
Cannot locate CTest configuration: /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/export/CTestConfig.cmake<br>
Delay the initialization of CTest<br>
Site: localhost<br>
Build name:<br>
Use Experimental tag: 20091019-1717<br>
Configure project<br>
Each . represents 1024 bytes of output<br>
. Size of output: 0K<br>
Build project<br>
Each symbol represents 1024 bytes of output.<br>
'!' represents an error and '*' a warning.<br>
. Size of output: 0K<br>
Error(s) when building project<br>
8 Compiler errors<br>
1 Compiler warnings<br>
Submit files (using http)<br>
Using HTTP submit method<br>
Drop site:<a href="http://localhost/CDash/submit.php?project=VEHICLES_2_1_0" target="_blank">http://localhost/CDash/submit.php?project=VEHICLES_2_1_0</a><br>
Uploaded: /var/opt/buildtools/release/VEHICLES_2_1_0/Project.xml<br>
Submission successful<br>
Submit files (using http)<br>
Using HTTP submit method<br>
Drop site:<a href="http://localhost/CDash/submit.php?project=VEHICLES_2_1_0" target="_blank">http://localhost/CDash/submit.php?project=VEHICLES_2_1_0</a><br>
Uploaded: /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/build.Release/Testing/20091019-1717/Build.xml<br>
Uploaded: /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/build.Release/Testing/20091019-1717/Configure.xml<br>
Submission successful<br>
Error in read script: /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/build.Release/bt_ctest.cmake<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>