summaryrefslogtreecommitdiffstats
path: root/ctest
Commit message (Collapse)AuthorAgeFilesLines
* Do not use MEMORYCHECK_SUPPRESSIONS_FILEKevin Rocard2015-04-241-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Fail memcheck target on leak or memory errorsKevin Rocard2015-04-242-0/+25
| | | | | | | | | | | Some unit test were checked using valgrind, but if an error was detected it was only logged: the build was not failed. Fail to build all *MemCheck targets if a leak or an error is reported by valgrind. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>
* Add comments in ctest list fileKevin Rocard2015-04-241-0/+4
| | | | | Mainly add a some documentation about the custom cmake set_test_env function.
* Move ctest definitions in it's own CMakeListKevin Rocard2015-04-242-0/+47
Ctest related files and definitions were at the source root although we try to keep it simple. Move all ctest related files and definition in a ctest directory. Signed-off-by: Kevin Rocard <kevin.rocard@intel.com>