cmCTestTestCommand.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #pragma once
  4. #include "cmConfigure.h" // IWYU pragma: keep
  5. #include <string>
  6. #include <utility>
  7. #include <cm/memory>
  8. #include "cmCTestHandlerCommand.h"
  9. #include "cmCommand.h"
  10. class cmCTestGenericHandler;
  11. /** \class cmCTestTest
  12. * \brief Run a ctest script
  13. *
  14. * cmCTestTestCommand defineds the command to test the project.
  15. */
  16. class cmCTestTestCommand : public cmCTestHandlerCommand
  17. {
  18. public:
  19. /**
  20. * This is a virtual constructor for the command.
  21. */
  22. std::unique_ptr<cmCommand> Clone() override
  23. {
  24. auto ni = cm::make_unique<cmCTestTestCommand>();
  25. ni->CTest = this->CTest;
  26. ni->CTestScriptHandler = this->CTestScriptHandler;
  27. return std::unique_ptr<cmCommand>(std::move(ni));
  28. }
  29. /**
  30. * The name of the command as specified in CMakeList.txt.
  31. */
  32. std::string GetName() const override { return "ctest_test"; }
  33. protected:
  34. void BindArguments() override;
  35. virtual cmCTestGenericHandler* InitializeActualHandler();
  36. cmCTestGenericHandler* InitializeHandler() override;
  37. std::string Start;
  38. std::string End;
  39. std::string Stride;
  40. std::string Exclude;
  41. std::string Include;
  42. std::string ExcludeLabel;
  43. std::string IncludeLabel;
  44. std::string ExcludeFixture;
  45. std::string ExcludeFixtureSetup;
  46. std::string ExcludeFixtureCleanup;
  47. std::string ParallelLevel;
  48. std::string Repeat;
  49. std::string ScheduleRandom;
  50. std::string StopTime;
  51. std::string TestLoad;
  52. std::string ResourceSpecFile;
  53. bool StopOnFailure = false;
  54. };