summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/kwsys/CMakeLists.txt6
-rw-r--r--Source/kwsys/testRegistry.cxx4
2 files changed, 8 insertions, 2 deletions
diff --git a/Source/kwsys/CMakeLists.txt b/Source/kwsys/CMakeLists.txt
index 38254b1..d2be205 100644
--- a/Source/kwsys/CMakeLists.txt
+++ b/Source/kwsys/CMakeLists.txt
@@ -650,11 +650,13 @@ IF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
ADD_TEST(kwsys.testProcess-7 ${EXEC_DIR}/testProcess 7)
ADD_TEST(kwsys.testHashSTL ${EXEC_DIR}/testHashSTL)
ADD_TEST(kwsys.testRegistry ${EXEC_DIR}/testRegistry)
- IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY)
+ IF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
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")
MESSAGE(STATUS "GET_TEST_PROPERTY returned: ${wfv}")
- ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY)
+ ENDIF(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY AND KWSYS_STANDALONE)
ENDIF(BUILD_TESTING)
ENDIF(KWSYS_STANDALONE OR CMake_SOURCE_DIR)
diff --git a/Source/kwsys/testRegistry.cxx b/Source/kwsys/testRegistry.cxx
index b808f11..1c31163 100644
--- a/Source/kwsys/testRegistry.cxx
+++ b/Source/kwsys/testRegistry.cxx
@@ -103,5 +103,9 @@ int main(int, char**)
{
kwsys_ios::cout << "Test failed" << kwsys_ios::endl;
}
+ else
+ {
+ kwsys_ios::cout << "Test passed" << kwsys_ios::endl;
+ }
return res;
}