diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2014-07-22 14:51:53 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2014-07-22 14:51:53 (GMT) |
commit | f7d62cac79f856c9c7b634ed7f5d2f6030b7ba76 (patch) | |
tree | d1c890ae5c905aeade55362f83376d7318a6c6c7 /Tests/CTestTestMemcheck/testAddressSanitizer.cmake | |
parent | 08bb09a944ecccb5d5f25c847be7b30a70ccf7c4 (diff) | |
download | CMake-f7d62cac79f856c9c7b634ed7f5d2f6030b7ba76.zip CMake-f7d62cac79f856c9c7b634ed7f5d2f6030b7ba76.tar.gz CMake-f7d62cac79f856c9c7b634ed7f5d2f6030b7ba76.tar.bz2 |
Fix leak and address sanitizer tests to be able to run with real tools.
When running CMake under Leak or Address Sanitizer tools, the fake reporting
would get picked up by the outer CMake and reported as leaks and address
failures on the CMake dashboard. This commit makes sure the test only
reports simulated errors when asked to.
Diffstat (limited to 'Tests/CTestTestMemcheck/testAddressSanitizer.cmake')
-rw-r--r-- | Tests/CTestTestMemcheck/testAddressSanitizer.cmake | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake b/Tests/CTestTestMemcheck/testAddressSanitizer.cmake index a359e28..a073151 100644 --- a/Tests/CTestTestMemcheck/testAddressSanitizer.cmake +++ b/Tests/CTestTestMemcheck/testAddressSanitizer.cmake @@ -5,6 +5,10 @@ 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 address 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") |