summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-11-09 16:07:36 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-11-09 16:07:36 (GMT)
commit4e9d832525c2648314c7c0dc7f3d1a73b181eb09 (patch)
treee4287bcff167bee1f909ae381524ea9537969d21
parenta285a90809a2b2b9cb0884e3e12eba7c5e3e1f09 (diff)
downloadCMake-4e9d832525c2648314c7c0dc7f3d1a73b181eb09.zip
CMake-4e9d832525c2648314c7c0dc7f3d1a73b181eb09.tar.gz
CMake-4e9d832525c2648314c7c0dc7f3d1a73b181eb09.tar.bz2
ENH: Change flag to PASS_REGULAR_EXPRESSION and FAIL_REGULAR_EXPRESSION and add help in cmSetTestsPropertiesCommand
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx4
-rw-r--r--Source/cmSetTestsPropertiesCommand.h10
-rw-r--r--Source/kwsys/CMakeLists.txt4
3 files changed, 12 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index 0385cd7..478e32e 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1558,7 +1558,7 @@ bool cmCTestTestHandler::SetTestsProperties(const std::vector<std::string>& args
{
rtit->m_WillFail = cmSystemTools::IsOn(val.c_str());
}
- if ( key == "ERROR_REGULAR_EXPRESSION" )
+ if ( key == "FAIL_REGULAR_EXPRESSION" )
{
std::vector<std::string> lval;
cmSystemTools::ExpandListArgument(val.c_str(), lval);
@@ -1568,7 +1568,7 @@ bool cmCTestTestHandler::SetTestsProperties(const std::vector<std::string>& args
rtit->m_ErrorRegularExpressions.push_back(cmsys::RegularExpression(crit->c_str()));
}
}
- if ( key == "REQUIRED_REGULAR_EXPRESSION" )
+ if ( key == "PASS_REGULAR_EXPRESSION" )
{
std::vector<std::string> lval;
cmSystemTools::ExpandListArgument(val.c_str(), lval);
diff --git a/Source/cmSetTestsPropertiesCommand.h b/Source/cmSetTestsPropertiesCommand.h
index 354eb3c..4a9c7d9 100644
--- a/Source/cmSetTestsPropertiesCommand.h
+++ b/Source/cmSetTestsPropertiesCommand.h
@@ -53,8 +53,14 @@ public:
{
return
" SET_TESTS_PROPERTIES(test1 [test2...] PROPERTIES prop1 value1 prop2 value2)\n"
- "Set a property for the tests. If the "
- "property is not found, CMake will report an error.";
+ "Set a property for the tests. If the property is not found, CMake will "
+ "report an error. The properties include:\n"
+ " WILL_FAIL if set to true, this will invert the pass/fail flag of the test.\n"
+ " PASS_REGULAR_EXPRESSION if set, the test output will be checked "
+ "against the specified regular expressions and at least one of the regular "
+ "expressions has to match, otherwise the test will fail.\n"
+ " FAIL_REGULAR_EXPRESSION if set, if the output will match to one of "
+ "specified regular expressions, the test will fail.";
}
cmTypeMacro(cmSetTestsPropertiesCommand, cmCommand);
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index f9a6ce2..aa28429 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -654,8 +654,8 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
ADD_TEST(kwsys.testFail ${EXEC_DIR}/testFail)
SET_TESTS_PROPERTIES(kwsys.testFail PROPERTIES WILL_FAIL ON)
GET_TEST_PROPERTY(kwsys.testFail WILL_FAIL wfv)
- SET_TESTS_PROPERTIES(kwsys.testRegistry PROPERTIES ERROR_REGULAR_EXPRESSION "ERROR;FAIL;Test failed")
- SET_TESTS_PROPERTIES(kwsys.testRegistry PROPERTIES REQUIRED_REGULAR_EXPRESSION "Test passed")
+ SET_TESTS_PROPERTIES(kwsys.testRegistry PROPERTIES FAIL_REGULAR_EXPRESSION "ERROR;FAIL;Test failed")
+ SET_TESTS_PROPERTIES(kwsys.testRegistry PROPERTIES PASS_REGULAR_EXPRESSION "Test passed")
MESSAGE(STATUS "GET_TEST_PROPERTY returned: ${wfv}")
ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
ENDIF(BUILD_TESTING)