summaryrefslogtreecommitdiffstats
path: root/Tests/CTestTestMemcheck/testLeakSanitizer.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-12-16 18:50:30 (GMT)
committerBrad King <brad.king@kitware.com>2014-12-18 15:12:15 (GMT)
commit1651dc96683282c0af8ef47973db9afa950d6bde (patch)
treec90f83059671a3d627ff2a1220ee3a1acf9487ef /Tests/CTestTestMemcheck/testLeakSanitizer.cmake
parent1c8129795ac482b36a67d0b7131f2bbd6ad04a54 (diff)
downloadCMake-1651dc96683282c0af8ef47973db9afa950d6bde.zip
CMake-1651dc96683282c0af8ef47973db9afa950d6bde.tar.gz
CMake-1651dc96683282c0af8ef47973db9afa950d6bde.tar.bz2
Tests: Move CTestTestMemcheck cases into a RunCMake.CTestMemcheck test
The CTestTestMemcheck test cases all try to check the ctest output with a regular expression. They fail intermittently due to ordering of the portions of the output that come from stdout and stderr being mixed. Convert all the test cases to use the RunCMake infrastructure to match stdout and stderr separately.
Diffstat (limited to 'Tests/CTestTestMemcheck/testLeakSanitizer.cmake')
-rw-r--r--Tests/CTestTestMemcheck/testLeakSanitizer.cmake47
1 files changed, 0 insertions, 47 deletions
diff --git a/Tests/CTestTestMemcheck/testLeakSanitizer.cmake b/Tests/CTestTestMemcheck/testLeakSanitizer.cmake
deleted file mode 100644
index 02030be..0000000
--- a/Tests/CTestTestMemcheck/testLeakSanitizer.cmake
+++ /dev/null
@@ -1,47 +0,0 @@
-# this file simulates a program that has been built with thread sanitizer
-# options
-
-message("ASAN_OPTIONS = [$ENV{ASAN_OPTIONS}]")
-string(REGEX REPLACE ".*log_path=\"([^\"]*)\".*" "\\1" LOG_FILE "$ENV{ASAN_OPTIONS}")
-message("LOG_FILE=[${LOG_FILE}]")
-# if we are not asked to simulate leak sanitizer don't do it
-if(NOT "$ENV{ASAN_OPTIONS}]" MATCHES "simulate_sanitizer.1")
- return()
-endif()
-
-# clear the log file
-file(REMOVE "${LOG_FILE}.2343")
-file(REMOVE "${LOG_FILE}.2344")
-
-# create an error of each type of thread santizer
-# these names come from tsan_report.cc in llvm
-
-file(APPEND "${LOG_FILE}.2343"
-"=================================================================
-==25308==ERROR: LeakSanitizer: detected memory leaks
-
-Direct leak of 4360 byte(s) in 1 object(s) allocated from:
- #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669)
- #1 0x4823b4 in main /home/kitware/msan/memcheck.cxx:12
- #2 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
-
-SUMMARY: AddressSanitizer: 4436 byte(s) leaked in 2 allocation(s).
-")
-file(APPEND "${LOG_FILE}.2342"
-"=================================================================
-==25308==ERROR: LeakSanitizer: detected memory leaks
-
-Direct leak of 76 byte(s) in 1 object(s) allocated from:
- #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669)
- #1 0x4821b8 in foo() /home/kitware/msan/memcheck.cxx:4
- #2 0x4823f2 in main /home/kitware/msan/memcheck.cxx:14
- #3 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
-
-Indirect leak of 76 byte(s) in 1 object(s) allocated from:
- #0 0x46c669 in operator new[](unsigned long) (/home/kitware/msan/a.out+0x46c669)
- #1 0x4821b8 in foo() /home/kitware/msan/memcheck.cxx:4
- #2 0x4823f2 in main /home/kitware/msan/memcheck.cxx:14
- #3 0x7fa72bee476c in __libc_start_main /build/buildd/eglibc-2.15/csu/libc-start.c:226
-
-SUMMARY: AddressSanitizer: 4436 byte(s) leaked in 2 allocation(s).
-")