diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2013-12-02 20:44:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-12-05 14:26:00 (GMT) |
commit | 1b173f25b44af406020c6bc440342632e2bbb1d3 (patch) | |
tree | 05da208ca236de9df560fa99aec17bce674fdd86 /Tests/Contracts | |
parent | f282a0bf83acd3e997b55967524fbd487bb6c881 (diff) | |
download | CMake-1b173f25b44af406020c6bc440342632e2bbb1d3.zip CMake-1b173f25b44af406020c6bc440342632e2bbb1d3.tar.gz CMake-1b173f25b44af406020c6bc440342632e2bbb1d3.tar.bz2 |
Tests/Contracts: Update test for VTK release branch
The plan is to reinstate the VTK contracts test so that CMake
& VTK devs will both be made aware when a change in CMake causes
build problems for VTK.
Diffstat (limited to 'Tests/Contracts')
-rw-r--r-- | Tests/Contracts/VTK/CMakeLists.txt | 48 | ||||
-rw-r--r-- | Tests/Contracts/VTK/Dashboard.cmake.in | 28 | ||||
-rw-r--r-- | Tests/Contracts/VTK/RunTest.cmake | 3 | ||||
-rw-r--r-- | Tests/Contracts/vtk542/CMakeLists.txt | 30 | ||||
-rw-r--r-- | Tests/Contracts/vtk542/RunTest.cmake | 1 |
5 files changed, 79 insertions, 31 deletions
diff --git a/Tests/Contracts/VTK/CMakeLists.txt b/Tests/Contracts/VTK/CMakeLists.txt new file mode 100644 index 0000000..5b19f01 --- /dev/null +++ b/Tests/Contracts/VTK/CMakeLists.txt @@ -0,0 +1,48 @@ +# The VTK external project for CMake +# --------------------------------------------------------------------------- +cmake_minimum_required(VERSION 2.8) +project(VTK) +include(ExternalProject) + +# find "HOME". VTK will be downloaded & built within a subdirectory. +if(NOT DEFINED HOME) + if(DEFINED ENV{CTEST_REAL_HOME}) + set(HOME "$ENV{CTEST_REAL_HOME}") + else() + set(HOME "$ENV{HOME}") + endif() + + if(NOT HOME AND WIN32) + # Try for USERPROFILE as HOME equivalent: + string(REPLACE "\\" "/" HOME "$ENV{USERPROFILE}") + + # But just use root of SystemDrive if USERPROFILE contains any spaces: + # (Default on XP and earlier...) + if(HOME MATCHES " ") + string(REPLACE "\\" "/" HOME "$ENV{SystemDrive}") + endif() + endif() +endif() + +set(base_dir "${HOME}/.cmake/Contracts/VTK") +set(stamp_dir "${base_dir}/stamp") + +if(NOT DEFINED SITE) + site_name(SITE) +endif() + +# configure our dashboard script +configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/Dashboard.cmake.in + ${base_dir}/Dashboard.cmake + @ONLY) + +# build & test VTK's release branch +ExternalProject_Add(${PROJECT_NAME} + GIT_REPOSITORY "git://vtk.org/VTK.git" + GIT_TAG "release" + STAMP_DIR ${stamp_dir} + CONFIGURE_COMMAND "" + BUILD_COMMAND ${CMAKE_CTEST_COMMAND} -S "${base_dir}/Dashboard.cmake" + INSTALL_COMMAND "" +) diff --git a/Tests/Contracts/VTK/Dashboard.cmake.in b/Tests/Contracts/VTK/Dashboard.cmake.in new file mode 100644 index 0000000..b10f384 --- /dev/null +++ b/Tests/Contracts/VTK/Dashboard.cmake.in @@ -0,0 +1,28 @@ +set(CTEST_SITE "@SITE@") +set(CTEST_BUILD_NAME "Contracts.VTK") +set(CTEST_DASHBOARD_ROOT "@base_dir@") +set(CTEST_SOURCE_DIRECTORY "${CTEST_DASHBOARD_ROOT}/VTK") +set(CTEST_BINARY_DIRECTORY "${CTEST_DASHBOARD_ROOT}/VTK-build") + +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CONFIGURATION_TYPE Debug) + +# Assume a Linux build, with a make that supports -j9. Modify this script if +# assumption is ever invalid. +# +set(CTEST_BUILD_COMMAND "@CMAKE_MAKE_PROGRAM@ -j9 -i") + +ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY}) + +file(WRITE "${CTEST_BINARY_DIRECTORY}/CMakeCache.txt" " + BUILD_EXAMPLES:BOOL=ON + BUILD_TESTING:BOOL=ON + VTK_WRAP_PYTHON:BOOL=ON + ExternalData_OBJECT_STORES:FILEPATH=@base_dir@/ExternalData +") + +ctest_start(Nightly) +ctest_configure(BUILD "${CTEST_BINARY_DIRECTORY}") +ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}") +ctest_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" INCLUDE "PythonSmoke") +ctest_submit(BUILD "${CTEST_BINARY_DIRECTORY}") diff --git a/Tests/Contracts/VTK/RunTest.cmake b/Tests/Contracts/VTK/RunTest.cmake new file mode 100644 index 0000000..65285cf --- /dev/null +++ b/Tests/Contracts/VTK/RunTest.cmake @@ -0,0 +1,3 @@ +set(exe "$ENV{HOME}/.cmake/Contracts/VTK/VTK-build/bin/vtkCommonCoreCxxTests") +set(args otherArrays) +set(VTK_RUN_TEST ${exe} ${args}) diff --git a/Tests/Contracts/vtk542/CMakeLists.txt b/Tests/Contracts/vtk542/CMakeLists.txt deleted file mode 100644 index cfb8b16..0000000 --- a/Tests/Contracts/vtk542/CMakeLists.txt +++ /dev/null @@ -1,30 +0,0 @@ -# The VTK external project for CMake -# --------------------------------------------------------------------------- -cmake_minimum_required(VERSION 2.8) -project(vtk542) -include(ExternalProject) - - -set(vtk_source "${CMAKE_CURRENT_BINARY_DIR}/VTK-source") -set(vtk_binary "${CMAKE_CURRENT_BINARY_DIR}/VTK-build") - -ExternalProject_Add(VTK - DOWNLOAD_DIR ${CMAKE_CURRENT_BINARY_DIR} - URL "http://www.vtk.org/files/release/5.4/vtk-5.4.2.tar.gz" - URL_MD5 c2c797091d4b2128d9a1bd32c4b78227 - SOURCE_DIR ${vtk_source} - BINARY_DIR ${vtk_binary} - CMAKE_GENERATOR "${CMAKE_GENERATOR}" - CMAKE_ARGS - -DBUILD_EXAMPLES:BOOL=ON - -DBUILD_TESTING:BOOL=ON - INSTALL_COMMAND "" - ) -# make it so that each build will run make in the VTK build tree -ExternalProject_Add_Step(VTK forcebuild - COMMAND ${CMAKE_COMMAND} - -E remove ${CMAKE_CURRENT_BUILD_DIR}/VTK-prefix/src/VTK-stamp/VTK-build - DEPENDEES configure - DEPENDERS build - ALWAYS 1 - ) diff --git a/Tests/Contracts/vtk542/RunTest.cmake b/Tests/Contracts/vtk542/RunTest.cmake deleted file mode 100644 index b4bd5b0..0000000 --- a/Tests/Contracts/vtk542/RunTest.cmake +++ /dev/null @@ -1 +0,0 @@ -set(vtk542_RUN_TEST VTK-build/bin/CommonCxxTests otherArrays) |