diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2014-10-06 18:13:37 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-07 19:27:34 (GMT) |
commit | 9ba8bf123c0a5c8410580b059ec33af656a569b8 (patch) | |
tree | ea55a2665c45cc1eade58ec123207307f45b0c9f /Tests/CTestTestMemcheck/CMakeLists.txt | |
parent | 816c100ae2d1ef9ad42186a260724a279b6b5934 (diff) | |
download | CMake-9ba8bf123c0a5c8410580b059ec33af656a569b8.zip CMake-9ba8bf123c0a5c8410580b059ec33af656a569b8.tar.gz CMake-9ba8bf123c0a5c8410580b059ec33af656a569b8.tar.bz2 |
tests: add a test for ctest_memcheck UndefinedBehaviorSanitizer
Diffstat (limited to 'Tests/CTestTestMemcheck/CMakeLists.txt')
-rw-r--r-- | Tests/CTestTestMemcheck/CMakeLists.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt index cd84e14..7fb4a0f 100644 --- a/Tests/CTestTestMemcheck/CMakeLists.txt +++ b/Tests/CTestTestMemcheck/CMakeLists.txt @@ -152,6 +152,23 @@ set_tests_properties(CTestTestMemcheckDummyAddressSanitizer PROPERTIES ".*Memory checking results:.*heap-buffer-overflow - 1.*") #----------------------------------------------------------------------------- +# add UndefinedBehaviorSanitizer test +set(CTEST_EXTRA_CODE +"set(CTEST_MEMORYCHECK_SANITIZER_OPTIONS \"simulate_sanitizer=1\") +") + +set(CMAKELISTS_EXTRA_CODE +"add_test(NAME TestSan COMMAND \"${CMAKE_COMMAND}\" +-P \"${CMAKE_CURRENT_SOURCE_DIR}/testUndefinedBehaviorSanitizer.cmake\") +") +gen_mc_test_internal(DummyUndefinedBehaviorSanitizer "" -DMEMCHECK_TYPE=UndefinedBehaviorSanitizer) +set(CMAKELISTS_EXTRA_CODE ) +set(CTEST_EXTRA_CODE) +set_tests_properties(CTestTestMemcheckDummyUndefinedBehaviorSanitizer PROPERTIES + PASS_REGULAR_EXPRESSION + ".*Memory checking results:.*left shift of negative value -256 - 1.*") + +#----------------------------------------------------------------------------- gen_mc_test(DummyPurify "\${PSEUDO_PURIFY}") gen_mc_test(DummyValgrind "\${PSEUDO_VALGRIND}") |