[CMake] simple ctest

David Cole david.cole at kitware.com
Thu Nov 5 02:25:59 EST 2009


Perhaps the repeated messages are from:
Were you perhaps setting CTEST_CONFIGURE_COMMAND to "ctest -S
script.cmake"?? -- that is definitely a big no-no, and will result in
recursion of running the script...


I get this when I try (but fail) to reproduce the issue:

C:\Users\david.cole\Dashboards\My Tests\scripts>ctest --version
ctest version 2.8.0-rc5

C:\Users\david.cole\Dashboards\My Tests\scripts>ctest -S script.cmake
Actual path is C:/Users/david.cole/Dashboards/My Tests/scripts/Step7/
Actual binary path is C:/Users/david.cole/Dashboards/My
Tests/scripts/Step7//build
WARNING: No nightly start time found please set in CTestConfig.cmake or
DartConfig.cmake
Cannot instantiate test handler ctest_configure
CMake Error at script.cmake:9 (CTEST_CONFIGURE):
  ctest_configure Configure command is not specified.  If this is a CMake
  project, specify CTEST_CMAKE_GENERATOR, or if this is not CMake project,
  specify CTEST_CONFIGURE_COMMAND.


Cannot instantiate test handler ctest_build
CMake Error at script.cmake:10 (CTEST_BUILD):
  ctest_build CTEST_BUILD_COMMAND or CTEST_CMAKE_GENERATOR not specified.
  Please specify the CTEST_CMAKE_GENERATOR and CTEST_PROJECT_NAME if this is
  a CMake project, or specify the CTEST_BUILD_COMMAND for cmake or any other
  project.


Error in read script: C:/Users/david.cole/Dashboards/My
Tests/scripts/script.cmake


So.... following the message "..... specify CTEST_CMAKE_GENERATOR, or ....."
I added the line to script.cmake:
SET ( CTEST_CMAKE_GENERATOR "Visual Studio 9 2008" )

with the result:
C:\Users\david.cole\Dashboards\My Tests\scripts>ctest -S script.cmake
Actual path is C:/Users/david.cole/Dashboards/My Tests/scripts/Step7/
Actual binary path is C:/Users/david.cole/Dashboards/My
Tests/scripts/Step7//build
WARNING: No nightly start time found please set in CTestConfig.cmake or
DartConfig.cmake
Current Tag empty, this may mean NightlyStartTime / CTEST_NIGHTLY_START_TIME
was not set correctly.
Or maybe you forgot to call ctest_start() before calling ctest_configure().
Cannot open configure file
Error in read script: C:/Users/david.cole/Dashboards/My
Tests/scripts/script.cmake


So..... I added:
SET ( CTEST_NIGHTLY_START_TIME "01:00:00 UTC" )

with the result:
C:\Users\david.cole\Dashboards\My Tests\scripts>ctest -S script.cmake
Actual path is C:/Users/david.cole/Dashboards/My Tests/scripts/Step7/
Actual binary path is C:/Users/david.cole/Dashboards/My
Tests/scripts/Step7//build
   Error when uploading file: C:/Users/david.cole/Dashboards/My
Tests/scripts/Step7/build/Testing/20
091105-0100/Build.xml
   Error message was: couldn't connect to host
   Problems when submitting via HTTP
Error in read script: C:/Users/david.cole/Dashboards/My
Tests/scripts/script.cmake


(So it succeeded in the end except for submitting to an empty drop site....)


But nothing like the repeated messages you were seeing. Were you perhaps
setting CTEST_CONFIGURE_COMMAND to "ctest -S script.cmake"?? -- that is
definitely a big no-no, and will result in recursion of running the
script...


HTH,
David


On Wed, Nov 4, 2009 at 7:23 AM, <th.tom at gmx.de> wrote:

> I did the following steps:
>
> 1) creating script.cmake:
> SET ( SOURCE_DIR "C:/my/sources/" )
> SET ( CTEST_BINARY_DIRECTORY ${SOURCE_DIR}/build )
> SET ( CTEST_SOURCE_DIRECTORY ${SOURCE_DIR} )
>
> MESSAGE ( "Actual path is ${CTEST_SOURCE_DIRECTORY}" )
> MESSAGE ( "Actual binary path is ${CTEST_BINARY_DIRECTORY}" )
>
> CTEST_START ( Nightly )
> CTEST_CONFIGURE ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
> CTEST_BUILD ( BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res )
> CTEST_SUBMIT ( RETURN_VALUE res )
>
> Then I start
> ctest -S script.cmake
>
> Then I got a wiered output:
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> Actual path is C:/my/sources/
> Actual binary path is C:/my/sources/build
> ...
>
> Then I delete the two output lines and start ctest again
>
> The output is the same!!! As if the script has not been changed
> I deleted the Testing directory - but no change
>
> What is going wrong here?
>
> - Tom
> _______________________________________________
> 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/20091105/a84319e7/attachment.htm>


More information about the CMake mailing list