diff options
author | Zack Galbreath <zack.galbreath@kitware.com> | 2013-12-02 15:44:38 -0500 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-12-05 09:26:00 -0500 |
commit | 1b173f25b44af406020c6bc440342632e2bbb1d3 (patch) | |
tree | 05da208ca236de9df560fa99aec17bce674fdd86 /Tests/Contracts/VTK | |
parent | f282a0bf83acd3e997b55967524fbd487bb6c881 (diff) | |
download | cmake-1b173f25b44af406020c6bc440342632e2bbb1d3.tar.gz |
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/VTK')
-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 |
3 files changed, 79 insertions, 0 deletions
diff --git a/Tests/Contracts/VTK/CMakeLists.txt b/Tests/Contracts/VTK/CMakeLists.txt new file mode 100644 index 0000000000..5b19f016cb --- /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 0000000000..b10f3848c0 --- /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 0000000000..65285cf77a --- /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}) |