summaryrefslogtreecommitdiffstats
path: root/ctest
diff options
context:
space:
mode:
authorKevin Rocard <kevin.rocard@intel.com>2015-04-13 14:42:36 +0200
committerEric Laurent <elaurent@google.com>2015-04-24 13:39:14 -0700
commita2d3f22e6c15dc84e266ff108d1fd42a8b665309 (patch)
tree81d5afb4c15e186a4d6d50e3e6f897b4b2e059fa /ctest
parent3e908cc03c48fa952fc0a496d01b94f0f3c8f79d (diff)
downloadexternal_parameter-framework-a2d3f22e6c15dc84e266ff108d1fd42a8b665309.zip
external_parameter-framework-a2d3f22e6c15dc84e266ff108d1fd42a8b665309.tar.gz
external_parameter-framework-a2d3f22e6c15dc84e266ff108d1fd42a8b665309.tar.bz2
Do not use MEMORYCHECK_SUPPRESSIONS_FILE
The pull request #88 was reverted as it broke travis build. ctest uses a cache variable MEMCHECK_SUPPRESSION_FILE. It sets it during the `include(ctest)` evaluation. Cache variable are set on creation, they can not be modify after by a CMakeList.mk (except with set's FORCE option). ef5736eb5 sets MEMCHECK_SUPPRESSION_FILE as a normal variable. This does not set the cache variable as expected but rather create a second local variable (not part of the cache) with the same name. If cmake was run once (as during travis build since patch 4e41ff7, until its revert d17b931), the local variable has no effect thus the suppression file was never saved in the cache. If cmake was run twice, during the second time, as the cache version is not recreated (cache variables are persistent), the call to set MEMCHECK_SUPPRESSION_FILE changes the cache version as it was first expected. As a result the build worked if cmake was invoked twice but failed if only called once. For more information, see the *** Variable types in CMake *** section at: http://www.cmake.org/cmake/help/v2.8.11/cmake.html#command%3aset This patch fixes all that by not using MEMCHECK_SUPPRESSION_FILE. but rather setting directly the option in valgrind. It is a clean fix as the MEMCHECK_SUPPRESSION_FILE is an option for the user to add a valgrind suppression file, it is not intended to be used by the project direcly. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
Diffstat (limited to 'ctest')
-rw-r--r--ctest/CMakeLists.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/ctest/CMakeLists.txt b/ctest/CMakeLists.txt
index c8cdbbb..bc74a93 100644
--- a/ctest/CMakeLists.txt
+++ b/ctest/CMakeLists.txt
@@ -37,8 +37,8 @@ set(MEMORYCHECK_COMMAND_OPTIONS
set(MEMORYCHECK_COMMAND_OPTIONS
"${MEMORYCHECK_COMMAND_OPTIONS} --error-exitcode=255 --log-fd=2")
-# Ignore errors from third-partie libraries
-set(MEMORYCHECK_SUPPRESSIONS_FILE "${CMAKE_CURRENT_LIST_DIR}/valgrind.supp")
+set(MEMORYCHECK_COMMAND_OPTIONS
+ "${MEMORYCHECK_COMMAND_OPTIONS} --suppressions=${CMAKE_CURRENT_LIST_DIR}/valgrind.supp")
# Enable tests, coverage, memcheck, ...
# See http://www.cmake.org/Wiki/CMake/Testing_With_CTest#Dashboard_Preparation