1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmSetTestsPropertiesCommand_h
13 #define cmSetTestsPropertiesCommand_h
15 #include "cmCommand.h"
17 class cmSetTestsPropertiesCommand : public cmCommand
20 virtual cmCommand* Clone()
22 return new cmSetTestsPropertiesCommand;
26 * This is called when the command is first encountered in
29 virtual bool InitialPass(std::vector<std::string> const& args,
30 cmExecutionStatus &status);
33 * The name of the command as specified in CMakeList.txt.
35 virtual const char* GetName() const { return "set_tests_properties";}
38 * Succinct documentation.
40 virtual const char* GetTerseDocumentation() const
42 return "Set a property of the tests.";
46 * Longer documentation.
48 virtual const char* GetFullDocumentation() const
51 " set_tests_properties(test1 [test2...] PROPERTIES prop1 value1 prop2"
53 "Set a property for the tests. If the property is not found, CMake "
54 "will report an error. The properties include:\n"
55 "WILL_FAIL: If set to true, this will invert the pass/fail flag of the"
57 "PASS_REGULAR_EXPRESSION: If set, the test output will be checked "
58 "against the specified regular expressions and at least one of the"
60 "expressions has to match, otherwise the test will fail.\n"
61 " Example: PASS_REGULAR_EXPRESSION \"TestPassed;All ok\"\n"
62 "FAIL_REGULAR_EXPRESSION: If set, if the output will match to one of "
63 "specified regular expressions, the test will fail.\n"
64 " Example: PASS_REGULAR_EXPRESSION \"[^a-z]Error;ERROR;Failed\"\n"
65 "Both PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION expect a "
66 "list of regular expressions.\n"
67 "TIMEOUT: Setting this will limit the test runtime to the number of "
68 "seconds specified.\n";
71 cmTypeMacro(cmSetTestsPropertiesCommand, cmCommand);
73 static bool SetOneTest(const char *tname,
74 std::vector<std::string> &propertyPairs,