Browse Source

Fix contract test so it is not hard coded to the vtk542 test.

Bill Hoffman 15 years ago
parent
commit
942ace8393
2 changed files with 10 additions and 1 deletions
  1. 9 1
      Tests/CMakeLists.txt
  2. 1 0
      Tests/Contracts/vtk542/RunTest.cmake

+ 9 - 1
Tests/CMakeLists.txt

@@ -1761,9 +1761,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
   # then the dashboard will run a contract with CMake test of that
   # name.  For example CMAKE_CONTRACT_PROJECTS = vtk542 would run
   # the vtk542 contract test.
+  # For each Contract test, the project should provide a directory
+  # with at least one CMakeLists.txt file that uses ExternalProject
+  # to download and configure the project. The directory should also
+  # contain a RunTest.cmake file that has a single set of the format:
+  # SET(project_RUN_TEST testToRun)
+  # The testToRun should be a test executable that can be run to
+  # smoke test the build.
   FOREACH(project ${CMAKE_CONTRACT_PROJECTS})
+    INCLUDE(Contracts/${project}/RunTest.cmake)
     ADD_TEST_MACRO(Contracts.${project}
-      VTK-build/bin/CommonCxxTests otherArrays)
+      ${${project}_RUN_TEST})
     SET_TESTS_PROPERTIES(Contracts.${project} PROPERTIES TIMEOUT 5400)
   ENDFOREACH()
 ENDIF(BUILD_TESTING)

+ 1 - 0
Tests/Contracts/vtk542/RunTest.cmake

@@ -0,0 +1 @@
+SET(vtk542_RUN_TEST VTK-build/bin/CommonCxxTests otherArrays)