MantisBT - CMake
View Issue Details
0005041CMakeCTestpublic2007-05-15 09:172010-12-14 18:49
Brad King 
David Cole 
lowminoralways
closedfixed 
 
 
0005041: Failed checkout of source has poor error
When doing initial checkout of source tree (saw this with new-style dashboard script), if CTestConfig.cmake or DartConfig.cmake does not exist at the top of the source produce a nice error and exit. Verify that this works properly with the old style.

Current error:

CTest command:
cvs update: No CVSROOT specified! Please use the `-d' option
cvs [update aborted]: or set the CVSROOT environment variable.
Start dashboard...

....


Error(s) when updating the project
  Build
Cannot instantiate test handler CTEST_BUILD
CMake Error: Error in cmake code at
/u/noibm34/Dashboards/DashboardScripts/aix_vtk_xlC.cmake:130:
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 pr
oject, or specify the CTEST_BUILD_COMMAND for cmake or any other project.
No tags attached.
Issue History
2007-08-31 11:28Alex NeundorfAssigned ToSystem Admin => David Cole
2009-12-29 17:22David ColeNote Added: 0019012
2009-12-29 18:00David ColeNote Added: 0019013
2009-12-29 18:04David ColeNote Added: 0019014
2009-12-29 18:04David ColeStatusassigned => resolved
2009-12-29 18:04David ColeResolutionopen => fixed
2010-12-14 18:49David ColeNote Added: 0024047
2010-12-14 18:49David ColeStatusresolved => closed

Notes
(0019012)
David Cole   
2009-12-29 17:22   
I am planning to make the following conditions "fatal" errors that halt script processing and exit with informative error messages:

- non-existent source directory
- source directory exists, but no CMakeLists.txt for a CMake-built project
- source directory and CMakeLists.txt exist, but no CTestConfig.cmake with a CTEST_PROJECT_NAME in it...


Here are the error messages I am going to use:
- for a non-existent source directory

CMake Error at quick.cmake:5 (ctest_start):
  ctest_start given source path

    C:/Users/.../Dashboards/My Tests/NoSuchDir

  which is not an existing directory. Set CTEST_CHECKOUT_COMMAND to a
  command line to create it.


Error in read script: C:/Users/.../Dashboards/My Tests/quick.cmake


- for a source directory exists, but no CMakeLists.txt for a CMake-built project
CMake Error at quick.cmake:8 (ctest_configure):
  ctest_configure CMakeLists.txt file does not exist
  'C:/Users/.../Dashboards/My Tests/playground/Step7/CMakeLists.txt'


Error in read script: C:/Users/.../Dashboards/My Tests/quick.cmake


- for a source directory and CMakeLists.txt exist, but no CTestConfig.cmake with a CTEST_PROJECT_NAME in it...
CMake Error at quick.cmake:10 (ctest_build):
  ctest_build has no project to build. If this is a "built with CMake"
  project, verify that CTEST_CMAKE_GENERATOR and CTEST_PROJECT_NAME are set.


  CTEST_PROJECT_NAME is usually set in CTestConfig.cmake. Verify that
  CTestConfig.cmake exists, or CTEST_PROJECT_NAME is set in the script, or
  PROJECT_NAME is passed as an argument to ctest_build.

  Alternatively, set CTEST_BUILD_COMMAND to build the project with a custom
  command line.


Error in read script: C:/Users/.../Dashboards/My Tests/quick.cmake
(0019013)
David Cole   
2009-12-29 18:00   
Actually, scratch the "fatal" error part of that last note. For now, I'm just going to improve the error messages so that people encountering them have a shot at figuring out what's wrong just from the text of the error messages.

We do not want to induce any fatal errors if it's possible to avoid them: so that the script continues all the way to its bottom line and its ctest_submit call: so that *something* *might* show up on the dashboard server even if it's all filled with errors...
(0019014)
David Cole   
2009-12-29 18:04   
Fixed in CVS HEAD of CMake.

Fix for issue 0005041 - improve error messages that may occur during ctest_build and ctest_configure.

The improved text gives very clear information when either the CMakeLists.txt or CTestConfig.cmake file is missing. Hopefully, it makes it easier for those poor future souls who encounter these messages to solve their problems quickly.

/cvsroot/CMake/CMake/Source/CTest/cmCTestBuildCommand.cxx,v <-- cmCTestBuildCommand.cxx
new revision: 1.24; previous revision: 1.23
/cvsroot/CMake/CMake/Source/CTest/cmCTestConfigureCommand.cxx,v <-- cmCTestConfigureCommand.cxx
new revision: 1.15; previous revision: 1.14
(0024047)
David Cole   
2010-12-14 18:49   
Closing bugs that have been resolved for more than 3 months without any further updates.