CTest: add a test for CTEST_CUSTOM_MEMCHECK_IGNORE
This commit is contained in:
parent
d26c9b69c5
commit
de8bffc8f8
|
@ -23,7 +23,8 @@ set_target_properties(pseudo_BC PROPERTIES OUTPUT_NAME BC)
|
||||||
add_executable(memcheck_fail "${CMAKE_CURRENT_BINARY_DIR}/ret1.c")
|
add_executable(memcheck_fail "${CMAKE_CURRENT_BINARY_DIR}/ret1.c")
|
||||||
|
|
||||||
foreach (_test IN ITEMS Unknown NotExist DummyValgrind DummyValgrindPrePost
|
foreach (_test IN ITEMS Unknown NotExist DummyValgrind DummyValgrindPrePost
|
||||||
DummyValgrindFailPre DummyValgrindFailPost DummyPurify DummyBC)
|
DummyValgrindFailPre DummyValgrindFailPost DummyPurify DummyBC
|
||||||
|
DummyValgrindIgnoreMemcheck)
|
||||||
configure_file(
|
configure_file(
|
||||||
"${CMAKE_CURRENT_SOURCE_DIR}/${_test}/test.cmake.in"
|
"${CMAKE_CURRENT_SOURCE_DIR}/${_test}/test.cmake.in"
|
||||||
"${CMAKE_CURRENT_BINARY_DIR}/${_test}/test.cmake"
|
"${CMAKE_CURRENT_BINARY_DIR}/${_test}/test.cmake"
|
||||||
|
@ -64,6 +65,10 @@ foreach (_pp Pre Post)
|
||||||
PASS_REGULAR_EXPRESSION "\nProblem running command: ${CMAKE_CURRENT_BINARY_DIR}[^\n]*fail[^\n]*\n(.*\n)?Problem executing ${_pp_lower}-memcheck command\\(s\\\).\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyValgrindFail${_pp}/test.cmake\n")
|
PASS_REGULAR_EXPRESSION "\nProblem running command: ${CMAKE_CURRENT_BINARY_DIR}[^\n]*fail[^\n]*\n(.*\n)?Problem executing ${_pp_lower}-memcheck command\\(s\\\).\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyValgrindFail${_pp}/test.cmake\n")
|
||||||
endforeach ()
|
endforeach ()
|
||||||
|
|
||||||
|
set_tests_properties(CTestTestMemcheckDummyValgrindIgnoreMemcheck
|
||||||
|
PROPERTIES
|
||||||
|
PASS_REGULAR_EXPRESSION "\n2/2 Test #2: RunCMakeAgain .*\n1/1 MemCheck #1: RunCMake .*${NORMAL_CTEST_OUTPUT}")
|
||||||
|
|
||||||
set_tests_properties(CTestTestMemcheckDummyPurify PROPERTIES
|
set_tests_properties(CTestTestMemcheckDummyPurify PROPERTIES
|
||||||
PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CMAKE_CURRENT_BINARY_DIR}/DummyPurify/Testing/Temporary/MemoryChecker.log\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyPurify/test.cmake\n")
|
PASS_REGULAR_EXPRESSION "\nCannot find memory tester output file: ${CMAKE_CURRENT_BINARY_DIR}/DummyPurify/Testing/Temporary/MemoryChecker.log\n(.*\n)?Error in read script: ${CMAKE_CURRENT_BINARY_DIR}/DummyPurify/test.cmake\n")
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
cmake_minimum_required(VERSION 2.8.9)
|
||||||
|
project(CTestTestMemcheckDummyValgrindIgnoreMemcheck)
|
||||||
|
include(CTest)
|
||||||
|
|
||||||
|
add_test (RunCMake "${CMAKE_COMMAND}")
|
||||||
|
add_test (RunCMakeAgain "${CMAKE_COMMAND}")
|
|
@ -0,0 +1,9 @@
|
||||||
|
set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrindIgnoreMemcheck")
|
||||||
|
set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT")
|
||||||
|
set (CTEST_DART_SERVER_VERSION "2")
|
||||||
|
set(CTEST_DROP_METHOD "http")
|
||||||
|
set(CTEST_DROP_SITE "www.cdash.org")
|
||||||
|
set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard")
|
||||||
|
set(CTEST_DROP_SITE_CDASH TRUE)
|
||||||
|
|
||||||
|
set(CTEST_CUSTOM_MEMCHECK_IGNORE RunCMakeAgain)
|
|
@ -0,0 +1,24 @@
|
||||||
|
cmake_minimum_required(VERSION 2.8.9)
|
||||||
|
|
||||||
|
# Settings:
|
||||||
|
set(CTEST_DASHBOARD_ROOT "@CMAKE_CURRENT_BINARY_DIR@")
|
||||||
|
set(CTEST_SITE "@SITE@")
|
||||||
|
set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-MemcheckDummyValgrindIgnoreMemcheck")
|
||||||
|
|
||||||
|
set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrindIgnoreMemcheck")
|
||||||
|
set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindIgnoreMemcheck")
|
||||||
|
set(CTEST_CVS_COMMAND "@CVSCOMMAND@")
|
||||||
|
set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@")
|
||||||
|
set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
|
||||||
|
set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@")
|
||||||
|
set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}")
|
||||||
|
|
||||||
|
set(CTEST_MEMORYCHECK_COMMAND "${PSEUDO_VALGRIND}")
|
||||||
|
|
||||||
|
#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
|
||||||
|
|
||||||
|
CTEST_START(Experimental)
|
||||||
|
CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||||
|
#CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||||
|
CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
||||||
|
CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)
|
Loading…
Reference in New Issue