[CMake] "Error in read script" when not calling CTEST_TEST in ctest script

David Cole david.cole at kitware.com
Mon Oct 19 14:31:44 EDT 2009


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.
The build errors mean that ctest's return value will be non-zero. (Same for
update, configure or test errors as well...)


HTH,
David



On Mon, Oct 19, 2009 at 1:22 PM, <winfried_mb2 at xmsnet.nl> wrote:

> 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.
>
> In this case the ctest output ends with:
> Error in read script: <ctest_scriptname here>
>
> and the exit code of ctest is 255 in this case.
> 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?
>
> I'm using cmake 2.8.0-rc3
>
> Thanks in advance for any clues!
> Arthur Dobbe
>
>
> set (CTEST_SOURCE_DIRECTORY
> "/var/opt/buildtools/release/VEHICLES_2_1_0/CAR_2_1/export")
> set (CTEST_BINARY_DIRECTORY
> "/var/opt/buildtools/release/VEHICLES_2_1_0/CAR_2_1/build.Release" )
> set(CTEST_PROJECT_NAME "VEHICLES_2_1_0")
> set(CTEST_NIGHTLY_START_TIME "00:00:00 UTC")
> set(CTEST_DROP_METHOD "http")
> set(CTEST_DROP_SITE "localhost")
> set(CTEST_DROP_LOCATION "/CDash/submit.php?project=VEHICLES_2_1_0")
> set(CTEST_DROP_SITE_CDASH TRUE)
> SET(CTEST_CMAKE_GENERATOR "Unix Makefiles")
> SET(CTEST_BUILD_COMMAND make)
> file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" "
> SITE:STRING=${hostname}
> CMAKE_BUILD_TYPE:STRING=Release
> PRODUCT_DIR:STRING=/var/opt/buildtools/release/VEHICLES_2_1_0
> ")
> set(CTEST_SITE "localhost")
> set_property(GLOBAL PROPERTY SubProject "CAR_2_1")
> set_property(GLOBAL PROPERTY Label "CAR_2_1")
> set (CTEST_BUILD_TARGET "CAR_2_1")
> CTEST_START("Experimental")
> CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE configRes)
> if (${configRes} EQUAL 0)
>    CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE buildRes)
> endif (${configRes} EQUAL 0)
> if (${buildRes} EQUAL 0)
>    execute_process(COMMAND "/usr/bin/make" "install" WORKING_DIRECTORY
> ${CTEST_BINARY_DIRECTORY} RESULT_VARIABLE makeInstallResult OUTPUT_VARIABLE
> makeInstallLog ERROR_VARIABLE makeInstallLog)
>    file(WRITE ${CTEST_BINARY_DIRECTORY}/makeinstall.log
> "${makeInstallLog}")
>    CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}")
> endif (${buildRes} EQUAL 0)
> CTEST_SUBMIT(FILES
> "/var/opt/buildtools/release/VEHICLES_2_1_0/Project.xml")
> CTEST_SUBMIT()
>
>
> Output of ctest when build fails:
>  # ctest -S bt_ctest.cmake
> Error(s) when building project
> Error in read script:
> /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/build.Release/bt_ctest.cmake
>
>
> Verbose output of ctest when build fails:
> # ctest -S bt_ctest.cmake -V
> Run dashboard with model Experimental
>   Source directory:
> /var/opt/buildtools/release/VEHICLES_2_1_0/CAR_2_1/export
>   Build directory:
> /var/opt/buildtools/release/VEHICLES_2_1_0/CAR_2_1/build.Release
>   Cannot locate CTest configuration:
> /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/export/CTestConfig.cmake
>   Delay the initialization of CTest
>   Site: localhost
>   Build name:
>   Use Experimental tag: 20091019-1717
> Configure project
>   Each . represents 1024 bytes of output
>    . Size of output: 0K
> Build project
>   Each symbol represents 1024 bytes of output.
>   '!' represents an error and '*' a warning.
>    . Size of output: 0K
> Error(s) when building project
>   8 Compiler errors
>   1 Compiler warnings
> Submit files (using http)
>   Using HTTP submit method
>   Drop site:http://localhost/CDash/submit.php?project=VEHICLES_2_1_0
>   Uploaded: /var/opt/buildtools/release/VEHICLES_2_1_0/Project.xml
>   Submission successful
> Submit files (using http)
>   Using HTTP submit method
>   Drop site:http://localhost/CDash/submit.php?project=VEHICLES_2_1_0
>   Uploaded:
> /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/build.Release/Testing/20091019-1717/Build.xml
>   Uploaded:
> /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/build.Release/Testing/20091019-1717/Configure.xml
>   Submission successful
> Error in read script:
> /var/opt/buildtools/release/VEHICLES_2_1_0/CAR/build.Release/bt_ctest.cmake
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091019/49918c2d/attachment-0001.htm>


More information about the CMake mailing list