cmCTestSubmitCommand.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  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 cmCTestSubmitCommand_h
  11. #define cmCTestSubmitCommand_h
  12. #include "cmCTestHandlerCommand.h"
  13. #include "cmCTest.h"
  14. /** \class cmCTestSubmit
  15. * \brief Run a ctest script
  16. *
  17. * cmCTestSubmitCommand defineds the command to submit the test results for
  18. * the project.
  19. */
  20. class cmCTestSubmitCommand : public cmCTestHandlerCommand
  21. {
  22. public:
  23. cmCTestSubmitCommand()
  24. {
  25. this->PartsMentioned = false;
  26. this->FilesMentioned = false;
  27. this->InternalTest = false;
  28. this->RetryCount = "";
  29. this->RetryDelay = "";
  30. this->CDashUpload = false;
  31. }
  32. /**
  33. * This is a virtual constructor for the command.
  34. */
  35. virtual cmCommand* Clone()
  36. {
  37. cmCTestSubmitCommand* ni = new cmCTestSubmitCommand;
  38. ni->CTest = this->CTest;
  39. ni->CTestScriptHandler = this->CTestScriptHandler;
  40. return ni;
  41. }
  42. virtual bool InitialPass(std::vector<std::string> const& args,
  43. cmExecutionStatus& status);
  44. /**
  45. * The name of the command as specified in CMakeList.txt.
  46. */
  47. virtual std::string GetName() const { return "ctest_submit"; }
  48. cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand);
  49. protected:
  50. cmCTestGenericHandler* InitializeHandler();
  51. virtual bool CheckArgumentKeyword(std::string const& arg);
  52. virtual bool CheckArgumentValue(std::string const& arg);
  53. enum
  54. {
  55. ArgumentDoingParts = Superclass::ArgumentDoingLast1,
  56. ArgumentDoingFiles,
  57. ArgumentDoingRetryDelay,
  58. ArgumentDoingRetryCount,
  59. ArgumentDoingCDashUpload,
  60. ArgumentDoingCDashUploadType,
  61. ArgumentDoingLast2
  62. };
  63. bool PartsMentioned;
  64. std::set<cmCTest::Part> Parts;
  65. bool FilesMentioned;
  66. bool InternalTest;
  67. cmCTest::SetOfStrings Files;
  68. std::string RetryCount;
  69. std::string RetryDelay;
  70. bool CDashUpload;
  71. std::string CDashUploadFile;
  72. std::string CDashUploadType;
  73. };
  74. #endif