cmCTestStartCommand.h 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmCTestStartCommand_h
  11. #define cmCTestStartCommand_h
  12. #include "cmCTestCommand.h"
  13. /** \class cmCTestStart
  14. * \brief Run a ctest script
  15. *
  16. * cmCTestStartCommand defineds the command to start the nightly testing.
  17. */
  18. class cmCTestStartCommand : public cmCTestCommand
  19. {
  20. public:
  21. cmCTestStartCommand();
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. virtual cmCommand* Clone()
  26. {
  27. cmCTestStartCommand* ni = new cmCTestStartCommand;
  28. ni->CTest = this->CTest;
  29. ni->CTestScriptHandler = this->CTestScriptHandler;
  30. ni->CreateNewTag = this->CreateNewTag;
  31. return ni;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args,
  38. cmExecutionStatus &status);
  39. /**
  40. * Will this invocation of ctest_start create a new TAG file?
  41. */
  42. bool ShouldCreateNewTag()
  43. {
  44. return this->CreateNewTag;
  45. }
  46. /**
  47. * The name of the command as specified in CMakeList.txt.
  48. */
  49. virtual const char* GetName() { return "ctest_start";}
  50. /**
  51. * Succinct documentation.
  52. */
  53. virtual const char* GetTerseDocumentation()
  54. {
  55. return "Starts the testing for a given model";
  56. }
  57. /**
  58. * More documentation.
  59. */
  60. virtual const char* GetFullDocumentation()
  61. {
  62. return
  63. " ctest_start(Model [TRACK <track>] [APPEND] [source [binary]])\n"
  64. "Starts the testing for a given model. The command should be called "
  65. "after the binary directory is initialized. If the 'source' and "
  66. "'binary' directory are not specified, it reads the "
  67. "CTEST_SOURCE_DIRECTORY and CTEST_BINARY_DIRECTORY. If the track is "
  68. "specified, the submissions will go to the specified track. "
  69. "If APPEND is used, the existing TAG is used rather than "
  70. "creating a new one based on the current time stamp.";
  71. }
  72. cmTypeMacro(cmCTestStartCommand, cmCTestCommand);
  73. private:
  74. bool InitialCheckout(std::ostream& ofs, std::string const& sourceDir);
  75. bool CreateNewTag;
  76. };
  77. #endif