Selaa lähdekoodia

Tests: remove code duplication in CTestTestMemCheck tests

The code for the tests is basically the same for all those subtests, so have
one template and configure that for as many tests as possible to make it
easier maintainable.
Rolf Eike Beer 12 vuotta sitten
vanhempi
sitoutus
abf1df48fc
29 muutettua tiedostoa jossa 55 lisäystä ja 319 poistoa
  1. 40 13
      Tests/CTestTestMemcheck/CMakeLists.txt
  2. 7 0
      Tests/CTestTestMemcheck/CMakeLists.txt.in
  3. 3 1
      Tests/CTestTestMemcheck/CTestConfig.cmake.in
  4. 0 5
      Tests/CTestTestMemcheck/DummyBC/CMakeLists.txt
  5. 0 7
      Tests/CTestTestMemcheck/DummyBC/CTestConfig.cmake
  6. 0 5
      Tests/CTestTestMemcheck/DummyPurify/CMakeLists.txt
  7. 0 7
      Tests/CTestTestMemcheck/DummyPurify/CTestConfig.cmake
  8. 0 25
      Tests/CTestTestMemcheck/DummyPurify/test.cmake.in
  9. 0 5
      Tests/CTestTestMemcheck/DummyValgrind/CMakeLists.txt
  10. 0 7
      Tests/CTestTestMemcheck/DummyValgrind/CTestConfig.cmake
  11. 0 25
      Tests/CTestTestMemcheck/DummyValgrind/test.cmake.in
  12. 0 5
      Tests/CTestTestMemcheck/DummyValgrindFailPost/CMakeLists.txt
  13. 0 7
      Tests/CTestTestMemcheck/DummyValgrindFailPost/CTestConfig.cmake
  14. 0 27
      Tests/CTestTestMemcheck/DummyValgrindFailPost/test.cmake.in
  15. 0 5
      Tests/CTestTestMemcheck/DummyValgrindFailPre/CMakeLists.txt
  16. 0 7
      Tests/CTestTestMemcheck/DummyValgrindFailPre/CTestConfig.cmake
  17. 0 27
      Tests/CTestTestMemcheck/DummyValgrindFailPre/test.cmake.in
  18. 0 6
      Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/CMakeLists.txt
  19. 0 9
      Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/CTestConfig.cmake
  20. 0 25
      Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/test.cmake.in
  21. 0 5
      Tests/CTestTestMemcheck/DummyValgrindPrePost/CMakeLists.txt
  22. 0 28
      Tests/CTestTestMemcheck/DummyValgrindPrePost/test.cmake.in
  23. 0 5
      Tests/CTestTestMemcheck/NotExist/CMakeLists.txt
  24. 0 7
      Tests/CTestTestMemcheck/NotExist/CTestConfig.cmake
  25. 0 19
      Tests/CTestTestMemcheck/NotExist/test.cmake.in
  26. 0 5
      Tests/CTestTestMemcheck/Unknown/CMakeLists.txt
  27. 0 7
      Tests/CTestTestMemcheck/Unknown/CTestConfig.cmake
  28. 0 19
      Tests/CTestTestMemcheck/Unknown/test.cmake.in
  29. 5 6
      Tests/CTestTestMemcheck/test.cmake.in

+ 40 - 13
Tests/CTestTestMemcheck/CMakeLists.txt

@@ -31,25 +31,52 @@ target_link_libraries(memcheck_fail CMakeLib)
 set(NORMAL_CTEST_OUTPUT "\n1/1 MemCheck #1: RunCMake \\.+   Passed +[0-9]+.[0-9]+ sec\n\n100% tests passed, 0 tests failed out of 1\n.*\n-- Processing memory checking output: \nMemory checking results:\n")
 set(BULLSEYE_MSG "(BullseyeCoverage[^\n]*\n)?")
 
-foreach  (_test IN ITEMS Unknown NotExist
-        DummyValgrind DummyValgrindPrePost
-        DummyValgrindFailPre DummyValgrindFailPost
-        DummyPurify DummyBC
-        DummyValgrindIgnoreMemcheck)
-    configure_file(
-        "${CMAKE_CURRENT_SOURCE_DIR}/${_test}/test.cmake.in"
-        "${CMAKE_CURRENT_BINARY_DIR}/${_test}/test.cmake"
-        @ONLY ESCAPE_QUOTES)
-    add_test(NAME CTestTestMemcheck${_test}
+function(gen_mc_test NAME CHECKER)
+    set(SUBTEST_NAME "${NAME}")
+    set(CHECKER_COMMAND "${CHECKER}")
+    foreach(_file IN ITEMS CMakeLists.txt CTestConfig.cmake test.cmake)
+        configure_file("${CMAKE_CURRENT_SOURCE_DIR}/${_file}.in"
+            "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/${_file}" @ONLY)
+    endforeach()
+    add_test(NAME CTestTestMemcheck${NAME}
         COMMAND ${CMAKE_CTEST_COMMAND}
-        -S "${CMAKE_CURRENT_BINARY_DIR}/${_test}/test.cmake" -V
-        --output-log "${CMAKE_CURRENT_BINARY_DIR}/${_test}/testOutput.log"
+        -C $<CONFIGURATION>
+        -S "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/test.cmake" -V
+        --output-log "${CMAKE_CURRENT_BINARY_DIR}/${NAME}/testOutput.log"
         -D PSEUDO_BC=$<TARGET_FILE:pseudo_BC>
         -D PSEUDO_PURIFY=$<TARGET_FILE:pseudo_purify>
         -D PSEUDO_VALGRIND=$<TARGET_FILE:pseudo_valgrind>
         -D ERROR_COMMAND=$<TARGET_FILE:memcheck_fail>
         )
-endforeach ()
+endfunction(gen_mc_test)
+
+unset(CTEST_EXTRA_CONFIG)
+unset(CTEST_EXTRA_CODE)
+unset(CMAKELISTS_EXTRA_CODE)
+
+gen_mc_test(DummyPurify "\${PSEUDO_PURIFY}")
+gen_mc_test(DummyValgrind "\${PSEUDO_VALGRIND}")
+gen_mc_test(DummyBC "\${PSEUDO_BC}")
+
+set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_PRE_MEMCHECK \"\${CTEST_MEMORYCHECK_COMMAND}\")\nset(CTEST_CUSTOM_POST_MEMCHECK \"\${CTEST_MEMORYCHECK_COMMAND}\")")
+gen_mc_test(DummyValgrindPrePost "\${PSEUDO_VALGRIND}")
+
+set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_POST_MEMCHECK \"\${ERROR_COMMAND}\")")
+gen_mc_test(DummyValgrindFailPost "\${PSEUDO_VALGRIND}")
+
+set(CTEST_EXTRA_CODE "set(CTEST_CUSTOM_PRE_MEMCHECK \"\${ERROR_COMMAND}\")")
+gen_mc_test(DummyValgrindFailPre "\${PSEUDO_VALGRIND}")
+
+unset(CTEST_EXTRA_CODE)
+set(CTEST_EXTRA_CONFIG "set(CTEST_CUSTOM_MEMCHECK_IGNORE RunCMakeAgain)\n")
+set(CMAKELISTS_EXTRA_CODE "add_test(NAME RunCMakeAgain COMMAND \"\${CMAKE_COMMAND}\" --version)")
+gen_mc_test(DummyValgrindIgnoreMemcheck "\${PSEUDO_VALGRIND}")
+
+unset(CTEST_EXTRA_CONFIG)
+unset(CMAKELISTS_EXTRA_CODE)
+gen_mc_test(NotExist "\${CTEST_BINARY_DIRECTORY}/no-memcheck-exe")
+
+gen_mc_test(Unknown "${CMAKE_COMMAND}")
 
 string(REPLACE "\\" "\\\\" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND}")
 string(REPLACE "(" "\\(" CMAKE_COMMAND_ESCAPED "${CMAKE_COMMAND_ESCAPED}")

+ 7 - 0
Tests/CTestTestMemcheck/CMakeLists.txt.in

@@ -0,0 +1,7 @@
+cmake_minimum_required(VERSION 2.8.9)
+project(CTestTestMemcheck@SUBTEST_NAME@)
+include(CTest)
+
+add_test(NAME RunCMake COMMAND "${CMAKE_COMMAND}" --version)
+
+@CMAKELISTS_EXTRA_CODE@

+ 3 - 1
Tests/CTestTestMemcheck/DummyValgrindPrePost/CTestConfig.cmake → Tests/CTestTestMemcheck/CTestConfig.cmake.in

@@ -1,7 +1,9 @@
-set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrindPrePost")
+set (CTEST_PROJECT_NAME "CTestTestMemcheck@SUBTEST_NAME@")
 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)
+
+@CTEST_EXTRA_CONFIG@

+ 0 - 5
Tests/CTestTestMemcheck/DummyBC/CMakeLists.txt

@@ -1,5 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckDummyBC)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")

+ 0 - 7
Tests/CTestTestMemcheck/DummyBC/CTestConfig.cmake

@@ -1,7 +0,0 @@
-set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyBC")
-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)

+ 0 - 5
Tests/CTestTestMemcheck/DummyPurify/CMakeLists.txt

@@ -1,5 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckDummyPurify)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")

+ 0 - 7
Tests/CTestTestMemcheck/DummyPurify/CTestConfig.cmake

@@ -1,7 +0,0 @@
-set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyPurify")
-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)

+ 0 - 25
Tests/CTestTestMemcheck/DummyPurify/test.cmake.in

@@ -1,25 +0,0 @@
-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@-MemcheckDummyPurify")
-
-set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_SOURCE_DIR@/DummyPurify")
-set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/DummyPurify")
-set(CTEST_CVS_COMMAND                   "@CVSCOMMAND@")
-set(CTEST_CMAKE_GENERATOR               "@CMAKE_TEST_GENERATOR@")
-set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
-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_PURIFY}")
-
-#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)

+ 0 - 5
Tests/CTestTestMemcheck/DummyValgrind/CMakeLists.txt

@@ -1,5 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckDummyValgrind)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")

+ 0 - 7
Tests/CTestTestMemcheck/DummyValgrind/CTestConfig.cmake

@@ -1,7 +0,0 @@
-set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrind")
-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)

+ 0 - 25
Tests/CTestTestMemcheck/DummyValgrind/test.cmake.in

@@ -1,25 +0,0 @@
-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@-MemcheckDummyValgrind")
-
-set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrind")
-set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrind")
-set(CTEST_CVS_COMMAND                   "@CVSCOMMAND@")
-set(CTEST_CMAKE_GENERATOR               "@CMAKE_TEST_GENERATOR@")
-set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
-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)

+ 0 - 5
Tests/CTestTestMemcheck/DummyValgrindFailPost/CMakeLists.txt

@@ -1,5 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckDummyValgrindFailPost)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")

+ 0 - 7
Tests/CTestTestMemcheck/DummyValgrindFailPost/CTestConfig.cmake

@@ -1,7 +0,0 @@
-set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrind")
-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)

+ 0 - 27
Tests/CTestTestMemcheck/DummyValgrindFailPost/test.cmake.in

@@ -1,27 +0,0 @@
-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@-MemcheckDummyValgrindFailPost")
-
-set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrindFailPost")
-set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindFailPost")
-set(CTEST_CVS_COMMAND                   "@CVSCOMMAND@")
-set(CTEST_CMAKE_GENERATOR               "@CMAKE_TEST_GENERATOR@")
-set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
-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}")
-
-set(CTEST_CUSTOM_POST_MEMCHECK "${ERROR_COMMAND}")
-
-#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)

+ 0 - 5
Tests/CTestTestMemcheck/DummyValgrindFailPre/CMakeLists.txt

@@ -1,5 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckDummyValgrindFailPre)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")

+ 0 - 7
Tests/CTestTestMemcheck/DummyValgrindFailPre/CTestConfig.cmake

@@ -1,7 +0,0 @@
-set (CTEST_PROJECT_NAME "CTestTestMemcheckDummyValgrind")
-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)

+ 0 - 27
Tests/CTestTestMemcheck/DummyValgrindFailPre/test.cmake.in

@@ -1,27 +0,0 @@
-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@-MemcheckDummyValgrindFailPre")
-
-set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrindFailPre")
-set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindFailPre")
-set(CTEST_CVS_COMMAND                   "@CVSCOMMAND@")
-set(CTEST_CMAKE_GENERATOR               "@CMAKE_TEST_GENERATOR@")
-set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
-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}")
-
-set(CTEST_CUSTOM_PRE_MEMCHECK "${ERROR_COMMAND}")
-
-#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)

+ 0 - 6
Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/CMakeLists.txt

@@ -1,6 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckDummyValgrindIgnoreMemcheck)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")
-add_test (RunCMakeAgain "${CMAKE_COMMAND}")

+ 0 - 9
Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/CTestConfig.cmake

@@ -1,9 +0,0 @@
-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 - 25
Tests/CTestTestMemcheck/DummyValgrindIgnoreMemcheck/test.cmake.in

@@ -1,25 +0,0 @@
-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_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
-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)

+ 0 - 5
Tests/CTestTestMemcheck/DummyValgrindPrePost/CMakeLists.txt

@@ -1,5 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckDummyValgrindPrePost)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")

+ 0 - 28
Tests/CTestTestMemcheck/DummyValgrindPrePost/test.cmake.in

@@ -1,28 +0,0 @@
-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@-MemcheckDummyValgrindPrePost")
-
-set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_SOURCE_DIR@/DummyValgrindPrePost")
-set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/DummyValgrindPrePost")
-set(CTEST_CVS_COMMAND                   "@CVSCOMMAND@")
-set(CTEST_CMAKE_GENERATOR               "@CMAKE_TEST_GENERATOR@")
-set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
-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}")
-
-set(CTEST_CUSTOM_PRE_MEMCHECK "${CTEST_MEMORYCHECK_COMMAND}")
-set(CTEST_CUSTOM_POST_MEMCHECK "${CTEST_MEMORYCHECK_COMMAND}")
-
-#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)

+ 0 - 5
Tests/CTestTestMemcheck/NotExist/CMakeLists.txt

@@ -1,5 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckNotExist)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")

+ 0 - 7
Tests/CTestTestMemcheck/NotExist/CTestConfig.cmake

@@ -1,7 +0,0 @@
-set (CTEST_PROJECT_NAME "CTestTestMemcheckUnknown")
-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)

+ 0 - 19
Tests/CTestTestMemcheck/NotExist/test.cmake.in

@@ -1,19 +0,0 @@
-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@-MemcheckNotExist")
-
-set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_SOURCE_DIR@/NotExist")
-set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/NotExist")
-set(CTEST_CVS_COMMAND                   "@CVSCOMMAND@")
-set(CTEST_CMAKE_GENERATOR               "@CMAKE_TEST_GENERATOR@")
-set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
-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           "${CTEST_BINARY_DIRECTORY}/no-memcheck-exe")
-
-CTEST_START(Experimental)
-CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

+ 0 - 5
Tests/CTestTestMemcheck/Unknown/CMakeLists.txt

@@ -1,5 +0,0 @@
-cmake_minimum_required(VERSION 2.8.9)
-project(CTestTestMemcheckUnknown)
-include(CTest)
-
-add_test (RunCMake "${CMAKE_COMMAND}")

+ 0 - 7
Tests/CTestTestMemcheck/Unknown/CTestConfig.cmake

@@ -1,7 +0,0 @@
-set (CTEST_PROJECT_NAME "CTestTestMemcheckUnknown")
-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)

+ 0 - 19
Tests/CTestTestMemcheck/Unknown/test.cmake.in

@@ -1,19 +0,0 @@
-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@-MemcheckUnknown")
-
-set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_SOURCE_DIR@/Unknown")
-set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/Unknown")
-set(CTEST_CVS_COMMAND                   "@CVSCOMMAND@")
-set(CTEST_CMAKE_GENERATOR               "@CMAKE_TEST_GENERATOR@")
-set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
-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           "@CMAKE_COMMAND@")
-
-CTEST_START(Experimental)
-CTEST_MEMCHECK(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res)

+ 5 - 6
Tests/CTestTestMemcheck/DummyBC/test.cmake.in → Tests/CTestTestMemcheck/test.cmake.in

@@ -3,10 +3,10 @@ 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@-MemcheckDummyBC")
+set(CTEST_BUILD_NAME                    "CTestTest-@BUILDNAME@-Memcheck@SUBTEST_NAME@")
 
-set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_SOURCE_DIR@/DummyBC")
-set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/DummyBC")
+set(CTEST_SOURCE_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@")
+set(CTEST_BINARY_DIRECTORY              "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@")
 set(CTEST_CVS_COMMAND                   "@CVSCOMMAND@")
 set(CTEST_CMAKE_GENERATOR               "@CMAKE_TEST_GENERATOR@")
 set(CTEST_CMAKE_GENERATOR_TOOLSET       "@CMAKE_TEST_GENERATOR_TOOLSET@")
@@ -14,12 +14,11 @@ 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_BC}")
+set(CTEST_MEMORYCHECK_COMMAND "@CHECKER_COMMAND@")
 
-#CTEST_EMPTY_BINARY_DIRECTORY(${CTEST_BINARY_DIRECTORY})
+@CTEST_EXTRA_CODE@
 
 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)