cmCTestSubmitHandler.h 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 cmCTestSubmitHandler_h
  14. #define cmCTestSubmitHandler_h
  15. #include "cmCTestGenericHandler.h"
  16. /** \class cmCTestSubmitHandler
  17. * \brief Helper class for CTest
  18. *
  19. * Submit testing results
  20. *
  21. */
  22. class cmCTestSubmitHandler : public cmCTestGenericHandler
  23. {
  24. public:
  25. cmTypeMacro(cmCTestSubmitHandler, cmCTestGenericHandler);
  26. cmCTestSubmitHandler();
  27. ~cmCTestSubmitHandler() { this->LogFile = 0; }
  28. /*
  29. * The main entry point for this class
  30. */
  31. int ProcessHandler();
  32. void Initialize();
  33. /** Specify a set of parts (by name) to submit. */
  34. void SelectParts(std::set<cmCTest::Part> const& parts);
  35. private:
  36. void SetLogFile(std::ostream* ost) { this->LogFile = ost; }
  37. /**
  38. * Submit file using various ways
  39. */
  40. bool SubmitUsingFTP(const cmStdString& localprefix,
  41. const std::set<cmStdString>& files,
  42. const cmStdString& remoteprefix,
  43. const cmStdString& url);
  44. bool SubmitUsingHTTP(const cmStdString& localprefix,
  45. const std::set<cmStdString>& files,
  46. const cmStdString& remoteprefix,
  47. const cmStdString& url);
  48. bool SubmitUsingSCP(const cmStdString& scp_command,
  49. const cmStdString& localprefix,
  50. const std::set<cmStdString>& files,
  51. const cmStdString& remoteprefix,
  52. const cmStdString& url);
  53. bool TriggerUsingHTTP(const std::set<cmStdString>& files,
  54. const cmStdString& remoteprefix,
  55. const cmStdString& url);
  56. bool SubmitUsingXMLRPC(const cmStdString& localprefix,
  57. const std::set<cmStdString>& files,
  58. const cmStdString& remoteprefix,
  59. const cmStdString& url);
  60. std::string GetSubmitResultsPrefix();
  61. cmStdString HTTPProxy;
  62. int HTTPProxyType;
  63. cmStdString HTTPProxyAuth;
  64. cmStdString FTPProxy;
  65. int FTPProxyType;
  66. std::ostream* LogFile;
  67. bool SubmitPart[cmCTest::PartCount];
  68. bool CDash;
  69. };
  70. #endif