cmCTestSubmitCommand.h 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. }
  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() const { return "ctest_submit";}
  45. cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand);
  46. protected:
  47. cmCTestGenericHandler* InitializeHandler();
  48. virtual bool CheckArgumentKeyword(std::string const& arg);
  49. virtual bool CheckArgumentValue(std::string const& arg);
  50. enum
  51. {
  52. ArgumentDoingParts = Superclass::ArgumentDoingLast1,
  53. ArgumentDoingFiles,
  54. ArgumentDoingRetryDelay,
  55. ArgumentDoingRetryCount,
  56. ArgumentDoingLast2
  57. };
  58. bool PartsMentioned;
  59. std::set<cmCTest::Part> Parts;
  60. bool FilesMentioned;
  61. bool InternalTest;
  62. cmCTest::SetOfStrings Files;
  63. std::string RetryCount;
  64. std::string RetryDelay;
  65. };
  66. #endif