diff options
author | Nils Gladitz <nilsgladitz@gmail.com> | 2013-12-14 23:31:14 (GMT) |
---|---|---|
committer | Nils Gladitz <nilsgladitz@gmail.com> | 2013-12-14 23:31:14 (GMT) |
commit | 57c008c37a575f379b15b8cdd929663bd12a4365 (patch) | |
tree | 5f84a587a0cfd65e852fd02377b1b63fb81c68f1 /Tests/CTestTestMemcheck | |
parent | c9ca4a7142adf93fd18fad202732d4d691625fda (diff) | |
download | CMake-57c008c37a575f379b15b8cdd929663bd12a4365.zip CMake-57c008c37a575f379b15b8cdd929663bd12a4365.tar.gz CMake-57c008c37a575f379b15b8cdd929663bd12a4365.tar.bz2 |
Tests: allow valgrind test to pass with symlinked build dir
Diffstat (limited to 'Tests/CTestTestMemcheck')
-rw-r--r-- | Tests/CTestTestMemcheck/CMakeLists.txt | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt index b5162c9..9bd7249 100644 --- a/Tests/CTestTestMemcheck/CMakeLists.txt +++ b/Tests/CTestTestMemcheck/CMakeLists.txt @@ -1,5 +1,13 @@ REGEX_ESCAPE_STRING(CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}") +get_filename_component(CTEST_REALPATH_CMAKE_CURRENT_BINARY_DIR + "${CMAKE_CURRENT_BINARY_DIR}" REALPATH +) + +REGEX_ESCAPE_STRING(CTEST_ESCAPED_REALPATH_CMAKE_CURRENT_BINARY_DIR + "${CTEST_REALPATH_CMAKE_CURRENT_BINARY_DIR}" +) + foreach (_retval 0 1) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/memtester.cxx.in" "${CMAKE_CURRENT_BINARY_DIR}/ret${_retval}.cxx" @ONLY) endforeach () @@ -180,7 +188,7 @@ set_tests_properties(CTestTestMemcheckDummyBC PROPERTIES PASS_REGULAR_EXPRESSION "\n1/1 MemCheck #1: RunCMake \\.+ Passed +[0-9]+.[0-9]+ sec\n\n100% tests passed, 0 tests failed out of 1\n(.*\n)?Error parsing XML in stream at line 1: no element found\n") set_tests_properties(CTestTestMemcheckDummyValgrindInvalidSupFile PROPERTIES - PASS_REGULAR_EXPRESSION "\nCannot find memory checker suppression file: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/does-not-exist\n") + PASS_REGULAR_EXPRESSION "\nCannot find memory checker suppression file: ${CTEST_ESCAPED_REALPATH_CMAKE_CURRENT_BINARY_DIR}/does-not-exist\n") set_tests_properties(CTestTestMemcheckDummyValgrindCustomOptions PROPERTIES PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindCustomOptions/Testing/Temporary/MemoryChecker.1.log\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyValgrindCustomOptions/test.cmake\n") |