cmCTestSubmitCommand.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmCTestSubmitCommand_h
  14. #define cmCTestSubmitCommand_h
  15. #include "cmCTestHandlerCommand.h"
  16. #include "cmCTest.h"
  17. /** \class cmCTestSubmit
  18. * \brief Run a ctest script
  19. *
  20. * cmCTestSubmitCommand defineds the command to submit the test results for
  21. * the project.
  22. */
  23. class cmCTestSubmitCommand : public cmCTestHandlerCommand
  24. {
  25. public:
  26. cmCTestSubmitCommand()
  27. {
  28. this->PartsMentioned = false;
  29. this->FilesMentioned = false;
  30. }
  31. /**
  32. * This is a virtual constructor for the command.
  33. */
  34. virtual cmCommand* Clone()
  35. {
  36. cmCTestSubmitCommand* ni = new cmCTestSubmitCommand;
  37. ni->CTest = this->CTest;
  38. ni->CTestScriptHandler = this->CTestScriptHandler;
  39. return ni;
  40. }
  41. /**
  42. * The name of the command as specified in CMakeList.txt.
  43. */
  44. virtual const char* GetName() { return "ctest_submit";}
  45. /**
  46. * Succinct documentation.
  47. */
  48. virtual const char* GetTerseDocumentation()
  49. {
  50. return "Submits the repository.";
  51. }
  52. /**
  53. * More documentation.
  54. */
  55. virtual const char* GetFullDocumentation()
  56. {
  57. return
  58. " ctest_submit([RETURN_VALUE res] [PARTS ...] [FILES ...])\n"
  59. "Submits the test results for the project. "
  60. "By default all available parts are submitted. "
  61. "The PARTS option lists a subset of parts to be submitted. "
  62. "The FILES option explicitly lists specific files to be submitted. "
  63. "Each individual file must exist at the time of the call.";
  64. }
  65. cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand);
  66. protected:
  67. cmCTestGenericHandler* InitializeHandler();
  68. virtual bool CheckArgumentKeyword(std::string const& arg);
  69. virtual bool CheckArgumentValue(std::string const& arg);
  70. enum
  71. {
  72. ArgumentDoingParts = Superclass::ArgumentDoingLast1,
  73. ArgumentDoingFiles,
  74. ArgumentDoingLast2
  75. };
  76. bool PartsMentioned;
  77. std::set<cmCTest::Part> Parts;
  78. bool FilesMentioned;
  79. cmCTest::SetOfStrings Files;
  80. };
  81. #endif