1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmCTestTestCommand.h,v $
6 Date: $Date: 2009-02-20 20:51:03 $
7 Version: $Revision: 1.11 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notices for more information.
16 =========================================================================*/
17 #ifndef cmCTestTestCommand_h
18 #define cmCTestTestCommand_h
20 #include "cmCTestHandlerCommand.h"
22 /** \class cmCTestTest
23 * \brief Run a ctest script
25 * cmCTestTestCommand defineds the command to test the project.
27 class cmCTestTestCommand
: public cmCTestHandlerCommand
34 * This is a virtual constructor for the command.
36 virtual cmCommand
* Clone()
38 cmCTestTestCommand
* ni
= new cmCTestTestCommand
;
39 ni
->CTest
= this->CTest
;
40 ni
->CTestScriptHandler
= this->CTestScriptHandler
;
45 * The name of the command as specified in CMakeList.txt.
47 virtual const char* GetName() { return "ctest_test";}
50 * Succinct documentation.
52 virtual const char* GetTerseDocumentation()
54 return "Run tests in the project build tree.";
60 virtual const char* GetFullDocumentation()
63 " ctest_test([BUILD build_dir] [APPEND]\n"
64 " [START start number] [END end number]\n"
65 " [STRIDE stride number] [EXCLUDE exclude regex ]\n"
66 " [INCLUDE include regex] [RETURN_VALUE res] \n"
67 " [EXCLUDE_LABEL exclude regex] \n"
68 " [INCLUDE_LABEL label regex] )\n"
69 "Tests the given build directory and stores results in Test.xml. The "
70 "second argument is a variable that will hold value. Optionally, "
71 "you can specify the starting test number START, the ending test number "
72 "END, the number of tests to skip between each test STRIDE, a regular "
73 "expression for tests to run INCLUDE, or a regular expression for tests "
74 "to not run EXCLUDE. EXCLUDE_LABEL and INCLUDE_LABEL are regular "
75 "expression for test to be included or excluded by the test "
78 CTEST_COMMAND_APPEND_OPTION_DOCS
;
81 cmTypeMacro(cmCTestTestCommand
, cmCTestHandlerCommand
);
84 virtual cmCTestGenericHandler
* InitializeActualHandler();
85 cmCTestGenericHandler
* InitializeHandler();